Function: relativeLuminance()
function relativeLuminance(color): number;
Defined in: contrast.ts:151
WCAG 2.x relative luminance of an sRGB colour, 0 (black) to 1 (white). A translucent colour is composited over white first, because that is the only background a standalone colour can be assumed to sit on.
Parameters
| Parameter | Type |
|---|---|
color | string |
Returns
number