brightness property

double brightness

Returns the brightness of the color.

The brightness is calculated as the average of the red, green, and blue components.

Implementation

double get brightness {
  return (red + green + blue) / 3 / 255;
}