solveToCam static method

Cam16 solveToCam(
  1. double hueDegrees,
  2. double chroma,
  3. double lstar
)

Finds a CAM16 object with the given hue, chroma, and L*, if possible.

Returns a CAM16 object representing a sRGB color with its hue, chroma, and L* sufficiently close to hueDegrees, chroma, and lstar, respectively. If it is impossible to satisfy all three constraints, the hue and L* will be sufficiently close, and the chroma will be maximized.

Implementation

static Cam16 solveToCam(double hueDegrees, double chroma, double lstar) {
  return Cam16.fromInt(solveToInt(hueDegrees, chroma, lstar));
}