shiftHue static method
Implementation
static Color shiftHue(
Color color,
double hueShift, {
double saturationFactor = 1.0,
double lightnessFactor = 1.0,
}) {
final hsl = HSLColor.fromColor(color);
return hsl
.withHue((hsl.hue + hueShift * 360) % 360)
.withSaturation(
(hsl.saturation * saturationFactor).clamp(0.0, 1.0).toDouble())
.withLightness(
(hsl.lightness * lightnessFactor).clamp(0.0, 1.0).toDouble())
.toColor();
}