luminance ()
Returns a number indicating the WCAG relative luminance of the given color.
Parameters
$color
- The color for which to calculate the relative luminance.
- Type
Color
Return Value
Number
- A number representing the relative luminance of the given color.
Example
@use '@sass-fairy/color';
@debug color.luminance(#fff);
// 1
@debug color.luminance(#000);
// 0
@debug color.luminance(red);
// 0.2126