mix: Color mixing

Description Usage Arguments Value Examples

Description

mix mixes two colors together

shade shades a given color, mixing it with black

tint tints a given color, mixing it with white

Usage

1
2
3
4
5
mix(col1, col2, amount = 0.5)

shade(col, amount)

tint(col, amount)

Arguments

col1

One or more colors, either hex or named TODO: update description

col2

One or more colors, either hex or named

amount

The amount of col2 to add. For shade and tint, this is the amount of black and white, respectively, to add.

col

Vector containing any of the three kinds of R color specifications:

  1. a color name (see colors)

  2. a hexadecimal string of the form "#rrggbb" (see rgb)

  3. a positive integer i meaning palette()[i]

Value

The mixed colors as hexadecimal strings

Examples

1
mix('#FFFFFF', '#0000FF', 0.2)

briandconnelly/colormod documentation built on May 13, 2019, 5:13 a.m.