chroma_get: Returns a single channel value.

Description Usage Arguments Value Examples

View source: R/chroma-utils.R

Description

Returns a single channel value.

Usage

1
chroma_get(color, channel)

Arguments

color

Hexadecimal string or a name for color.

channel

Channel desired, for example "hsl.h" for hue parameter in hsl color space.

Value

a single numeric value

Examples

1
2
3
4
5
chroma_get("#1D9A6C", "hsl.h")
chroma_get("hotpink", "hsl.h")

# vectorized over color
chroma_get(c("hotpink", "steelblue"), "rgb.g")

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