col_mult: col_mult

Description Usage Arguments See Also Examples

Description

Multiplies two colors together. If A and B are vectors in [0,1]^3 (i.e. R, G, B), then to multiply the colors A and B, do elementwise multiplication.

Usage

1
col_mult(col1, col2)

Arguments

col1

a color, either in name or integer/hexidecimal

col2

a color, either in name or integer/hexidecimal

See Also

col_dens, col_gray, col_fade

Examples

1
2
3
4
5
6
7
8
col_mult("red", "yellow")
# returns #FF0000, i.e. red

col_mult("dodgerblue", "white")
# returns #1E90FF, i.e. dodgerblue ("white" is identity)

col_mult("dodgerblue", "gray50")
# returns #0F487F, i.e. a darkened version of dodgerblue

mickwar/mwBASE documentation built on May 22, 2019, 9:56 p.m.