chroma_mix: Mixes two colors

Description Usage Arguments Value Examples

View source: R/chroma-utils.R

Description

Mixes two colors

Usage

1
2
3
4
5
6
chroma_mix(
  color1,
  color2,
  ratio = 0.5,
  mode = c("rgb", "hsl", "lab", "lrgb", "lch")
)

Arguments

color1

Hexadecimal string or a name for color one.

color2

Hexadecimal string or a name for color two.

ratio

A value between 0 and 1.

mode

Color space used for interpolation.

Value

A hexadecimal string

Examples

1
2
3
4
5
chroma_mix("red", "blue")

chroma_mix("red", "blue", ratio = 0.75)

chroma_mix("red", "blue", mode = "lab")

dreamRs/colorscale documentation built on April 17, 2020, 8:38 a.m.