whiteness property Null safety

num whiteness

This color's whiteness, a percentage between 0 and 100.


num get whiteness {
  // Because HWB is (currently) used much less frequently than HSL or RGB, we
  // don't cache its values because we expect the memory overhead of doing so
  // to outweigh the cost of recalculating it on access.
  return math.min(math.min(red, green), blue) / 255 * 100;