Color24.fromRGB constructor

  1. @literal
const Color24.fromRGB(
  1. int red,
  2. int green,
  3. int blue
)

Creates a Color24 from the provided red, green, and blue values.

Each value should be in the range 0-255.

Implementation

@literal
const Color24.fromRGB(int red, int green, int blue)
  : _value = ((red & 0xFF) << 16) | ((green & 0xFF) << 8) | blue & 0xFF;