chroma property

double chroma

Implementation

double get chroma {
  return _chroma;
}
void chroma=(double newChroma)

0 <= newChroma <= ? After setting chroma, the color is mapped from HCT to the more limited sRGB gamut for display. This will change its ARGB/integer representation. If the HCT color is outside of the sRGB gamut, chroma will decrease until it is inside the gamut.

Implementation

set chroma(double newChroma) {
  _argb = HctSolver.solveToInt(hue, newChroma, tone);
  final cam16 = Cam16.fromInt(_argb);
  _hue = cam16.hue;
  _chroma = cam16.chroma;
  _tone = ColorUtils.lstarFromArgb(_argb);
}