Skip to content

Colors ​

Colors: the fill of an SVG element, and the black or white text that reads best on it.

ExportWhat it does
getContrastingTextColorPicks the text color, pure black or pure white, that reads best on a background.
getSvgFillColorReads the fill color of an SVG element as rendered, whatever sets it: attribute, class, inherited style.
RgbAn sRGB color, each channel from 0 to 255.

Generated from the JSDoc of the sources.