withHue method
Returns a new color that matches this color, but with its hue modified.
By default, the current hue is replaced with the given hue angle (from 0 to 360).
When replace
is false, the current hue will be rotated by the specified angle instead.
Note: The new color is specified in the OKLCH color space, which gives a more uniform perception of color than HSL, but uses different hue angles than the sRGB color space.
Implementation
@override
ThemeColor withHue(double hue, {bool replace = true}) {
return ThemeColor(
light.withHue(hue, replace: replace),
dark: dark?.withHue(hue, replace: replace),
);
}