pick_text_color: Pick text color based on background.

Description Usage Arguments

View source: R/colors.R

Description

In order to always see the text, function uses Gray 10 or White based on the "luminance" of the background. Uses W3C guidelines and calculations found on stackoverflow here: https://stackoverflow.com/questions/3942878/how-to-decide-font-color-in-white-or-black-depending-on-background-color

Usage

1
pick_text_color(hex_color)

Arguments

hex_color

A hexidecimal color for the background


brascoball/ggquik documentation built on Feb. 14, 2021, 5:17 p.m.