toRgb888 method

({int b, int g, int r}) toRgb888()

Converts the RGB565 color to the closest representable RGB888 color.

Implementation

({int r, int g, int b}) toRgb888() {
  return (
    r: (red * 255 / 31).round(),
    g: (green * 255 / 63).round(),
    b: (blue * 255 / 31).round()
  );
}