withHue method

  1. @override
OklabColor withHue(
  1. num hue
)

Returns this LabColor modified with the provided hue value.

Implementation

@override
OklabColor withHue(num hue) {
  assert(hue >= 0 && hue <= 360);
  final hslColor = toHslColor();
  return hslColor.withHue((hslColor.hue + hue) % 360).toOklabColor();
}