preferLightText
preferLightText(
bg):boolean
Defined in: packages/math-color/src/encoding/rgb8/accessibility/prefer-light-text.ts:11
Returns true if white foreground text achieves higher absolute APCA Lc
contrast against bg than black foreground text.
Use this to choose between light and dark text overlaid on a background color.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”boolean