color_text_by_luminance: Set text color based on luminance

View source: R/utils_css_color.R

color_text_by_luminanceR Documentation

Set text color based on luminance

Description

Useful for applying one or another of text colors based on the luminance of a background

Usage

color_text_by_luminance(colors, text_light = "white", text_dark = "black")

Arguments

colors

chr of css colors

text_light

chr CSS color for light text

text_dark

chr CSS color for dark text

Value

chr CSS text colors

See Also

Other color: color_cycle(), color_distance(), color_luminance(), color_match(), color_rgb_table(), color_separate(), colors2css(), css_col2vec(), luminance_filter(), rgb2hex()

Examples

color_text_by_luminance(c("white", "magenta", "red", "brown", "yellow"))

yogat3ch/UU documentation built on May 31, 2024, 10:14 p.m.