A function to label the text color in charts inside the fill of bar charts, returns either "black" or "white" depending on the luminance of the color scale passed to it.
Usage
labelColorMaker(colors, names = NULL)
Arguments
- colors
Required, a character vector of hex color codes, usually for the color palette of a chart.
- names
Optional, a character vector the same length of colors argument to add names to the returned vector.
Value
a character vector of colors either "black" or "white" for labeling text in fill colors.