luma property

num luma

The luma, or mean proportion component weighted by human perception of lightness, of color.

Implementation

num get luma {
  final components = rgbProportions;
  return List.generate(3, (i) => components[i] * [0.299, 0.587, 0.114][i])
      .fold(0, (a, b) => a + b);
}