Description Usage Arguments Details Value Examples
These functions help you consider colors in terms of their hue, chroma, and luminance (HCL). You will need the colorspace package to run these functions.
1 2 3 |
colors |
|
background |
|
title |
|
decimals |
|
If you provide a background
color, the prominence of each color from the
background, i.e. the perceptual distance from the background, is calculated.
Furthermore, hcl_table()
sets the background color accordingly.
hcl_dataframe()
: get a data frame with HCL data
hcl_table()
: get a formatted gt table;
you will need the gt package.
hcl_dataframe()
data.frame
with columns:
name
, color
, hue
, chroma
luminance
, prominence
.
hcl_table()
An object with S3 class gt_tbl
.
1 2 3 4 5 6 7 | # return data
hcl_dataframe("red")
hcl_dataframe("#FF0000")
hcl_dataframe(c("red", "green"))
# return formatted table
hcl_table(c("red", "green"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.