HspColor constructor

const HspColor(
  1. num hue,
  2. num saturation,
  3. num perceivedBrightness, [
  4. int alpha = 255,
])

A color in the HSP color space.

hue must be >= 0 and <= 360.

saturation and perceivedBrightness must both be >= 0 and <= 100.

alpha must be >= 0 and <= 255.

See: http://alienryderflex.com/hsp.html

Implementation

const HspColor(
  this.hue,
  this.saturation,
  this.perceivedBrightness, [
  int alpha = 255,
])  : assert(hue >= 0 && hue <= 360),
      assert(saturation >= 0 && saturation <= 100),
      assert(perceivedBrightness >= 0 && perceivedBrightness <= 100),
      assert(alpha >= 0 && alpha <= 255),
      super(alpha: alpha);