getRotatedHue static method

double getRotatedHue(
  1. Hct sourceColorHct,
  2. List<double> hueBreakpoints,
  3. List<double> rotations
)

Implementation

static double getRotatedHue(
  Hct sourceColorHct,
  List<double> hueBreakpoints,
  List<double> rotations,
) {
  var rotation = getPiecewiseValue(sourceColorHct, hueBreakpoints, rotations);
  if (math.min(hueBreakpoints.length - 1, rotations.length) <= 0) {
    // No condition matched, return the source hue.
    rotation = 0.0;
  }
  return MathUtils.sanitizeDegreesDouble(sourceColorHct.hue + rotation);
}