TODO: some notes here on is_rgb_limit being applied to non-cvd case.

pev_data_hcl(hex, ...)

# S3 method for default
pev_data_hcl(hex, ...)

# S3 method for character
pev_data_hcl(hex, n = NULL, include_cvd = TRUE,
  ...)

# S3 method for pev_fcont
pev_data_hcl(hex, n = NULL, include_cvd = TRUE,
  ...)

# S3 method for pev_fdisc
pev_data_hcl(hex, n = NULL, include_cvd = TRUE,
  ...)

Arguments

hex

character vector of hex-colors

...

other args (not used)

n

integer number of colors to use for unbounded palette-functions

include_cvd

logical or character, indicates to include data for for color-vision deficiency. Possible character values: "none", "protan", "deutan", "tritan".

Value

data.frame with variables cvd, x, hex, hue, chroma, luminance, is_rgb_limit

Examples

pev_data_hcl("Viridis")
#> # A tibble: 44 x 7 #> cvd x hex hue chroma luminance is_rgb_limit #> <chr> <dbl> <chr> <dbl> <dbl> <dbl> <lgl> #> 1 none 0 #FDE333 74.8 94.9 89.9 FALSE #> 2 none 0.1 #C2DE34 97.5 89.4 83.9 FALSE #> 3 none 0.2 #7ED357 120. 83.6 77.1 FALSE #> 4 none 0.3 #00C475 142. 77.7 70.0 TRUE #> 5 none 0.4 #00B28A 159. 58.1 64.7 TRUE #> 6 none 0.5 #009B95 186. 45.5 57.7 TRUE #> 7 none 0.6 #008298 217. 45.1 49.8 TRUE #> 8 none 0.7 #006791 237. 50.1 40.8 TRUE #> 9 none 0.8 #274983 255. 51.1 31.4 FALSE #> 10 none 0.9 #44286E 277. 45.8 23.2 FALSE #> # … with 34 more rows
pev_data_hcl(grDevices::heat.colors(10))
#> # A tibble: 40 x 7 #> cvd x hex hue chroma luminance is_rgb_limit #> <chr> <dbl> <chr> <dbl> <dbl> <dbl> <lgl> #> 1 none 0 #FF0000 12.2 179. 53.2 TRUE #> 2 none 0.111 #FF2400 13.5 172. 54.6 TRUE #> 3 none 0.222 #FF4900 17.3 156. 58.1 TRUE #> 4 none 0.333 #FF6D00 24.5 134. 63.5 TRUE #> 5 none 0.444 #FF9200 36.6 113. 70.7 TRUE #> 6 none 0.556 #FFB600 52.7 101. 78.9 TRUE #> 7 none 0.667 #FFDB00 70.8 99.1 87.9 TRUE #> 8 none 0.778 #FFFF00 85.9 107. 97.1 TRUE #> 9 none 0.889 #FFFF40 85.9 100. 97.3 TRUE #> 10 none 1 #FFFFBF 85.9 45.6 98.6 TRUE #> # … with 30 more rows