getLuminance function

int getLuminance(
  1. int color
)

Returns the luminance (grayscale) value of the color.

Implementation

int getLuminance(int color) {
  final r = getRed(color);
  final g = getGreen(color);
  final b = getBlue(color);
  return getLuminanceRgb(r, g, b);
}