is-light ()
Indicates whether a given color is considered light.
Parameters
$color- The color which may be light.
- Type
Color
Return Value
Booleantrueif the given color is considered light; otherwise,false.
Example
@use '@sass-fairy/color';
@debug color.is-light(#000);
// false
@debug color.is-light(#fff);
// true
@debug color.is-light(darkgreen);
// false
info
See 24 ways’ calculating color contrast for more information.