View source: R/utils_css_color.R
| color_text_by_luminance | R Documentation |
Useful for applying one or another of text colors based on the luminance of a background
color_text_by_luminance(colors, text_light = "white", text_dark = "black")
colors |
|
text_light |
|
text_dark |
|
chr CSS text colors
Other color:
color_cycle(),
color_distance(),
color_luminance(),
color_match(),
color_rgb_table(),
color_separate(),
colors2css(),
css_col2vec(),
luminance_filter(),
rgb2hex()
color_text_by_luminance(c("white", "magenta", "red", "brown", "yellow"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.