luminance property
double
get
luminance
Computes the relative luminance of this Color using the sRGB color space.
This value is used to determine if a color is perceived as light or dark for calculating accessible text contrast.
Note: This is computationally expensive to calculate and should be cached if accessed frequently.
@returns A double between 0.0 (black) and 1.0 (white).
Implementation
double get luminance => computeLuminance();