getLuminanceNormalized function

num getLuminanceNormalized(
  1. Color c
)

Returns the normalized [0, 1] luminance (grayscale) value of the color.

Implementation

num getLuminanceNormalized(Color c) =>
    0.299 * c.rNormalized + 0.587 * c.gNormalized + 0.114 * c.bNormalized;