computeLuminance method
The WCAG relative luminance of this colour, in the range 0.0-1.0.
Matches Color.computeLuminance. Material uses this to decide whether a surface needs light or dark ink, so a constant here makes every widget treat the colour as pure black.
Implementation
@override
double computeLuminance() {
double linearize(double component) => component <= 0.03928
? component / 12.92
: math.pow((component + 0.055) / 1.055, 2.4).toDouble();
return 0.2126 * linearize(r) + 0.7152 * linearize(g) + 0.0722 * linearize(b);
}