colorchart: Get built-in color names with Hex, RGB and HCL values

Description Usage Arguments Value

View source: R/converters.R

Description

Works like grDevices::colors() but returns a dataframe of Hex RGB codes, integer red, green, and blue values, and the corresponding H, C, and L values (in HCL color space) for all color names.

Usage

1
colorchart(distinct = FALSE)

Arguments

distinct

logical indicating if the colors returned should all be distinct; e.g., "snow" and "snow1" are synonyms with the same RGB values.

Value

Data frame with 1 row per color and 7 variables:

hex

Hexidecimal RGB color string

red

Red value (0 to 255)

green

Green value (0 to 255)

blue

Blue value (0 to 255)

L

Lightness value (0.0 to 100.0)

C

Chroma value (0.0 to ~150.0). Note: Maximum C depends on L and H.

H

Hue angle (0.0 to 360.0)


allopole/datacolor documentation built on May 4, 2019, 6:39 p.m.