Color.from constructor

const Color.from({
  1. required double alpha,
  2. required double red,
  3. required double green,
  4. required double blue,
  5. ColorSpace colorSpace = ColorSpace.sRGB,
})

Construct a color with normalized color components.

Normalized color components allows arbitrary bit depths for color components to be be supported. The values will be normalized relative to the ColorSpace argument.

Implementation

const Color.from(
    {required double alpha,
    required double red,
    required double green,
    required double blue,
    this.colorSpace = ColorSpace.sRGB})
    : a = alpha,
      r = red,
      g = green,
      b = blue;