diff --git a/lib/src/functions/color.dart b/lib/src/functions/color.dart index ee69e6896..472006e6b 100644 --- a/lib/src/functions/color.dart +++ b/lib/src/functions/color.dart @@ -1384,7 +1384,7 @@ double? _channelFromValue(ColorChannel channel, SassNumber? value) => 'Expected $value to have unit "%".', channel.name), LinearChannel() => _percentageOrUnitless(value, channel.max, channel.name), - _ => value.coerceValueToUnit('deg', channel.name) + _ => value.coerceValueToUnit('deg', channel.name) % 360 }); /// Returns whether [value] is an unquoted string case-insensitively equal to diff --git a/lib/src/value/color.dart b/lib/src/value/color.dart index 6ffdb2bfa..33b6c2f47 100644 --- a/lib/src/value/color.dart +++ b/lib/src/value/color.dart @@ -249,7 +249,7 @@ class SassColor extends Value { /// This color's hue, between `0` and `360`. @Deprecated('Use channel() instead.') - double get hue => _legacyChannel(ColorSpace.hsl, 'hue') % 360; + double get hue => _legacyChannel(ColorSpace.hsl, 'hue'); /// This color's saturation, a percentage between `0` and `100`. @Deprecated('Use channel() instead.') diff --git a/lib/src/value/color/space/lch.dart b/lib/src/value/color/space/lch.dart index d522e6454..c66baab64 100644 --- a/lib/src/value/color/space/lch.dart +++ b/lib/src/value/color/space/lch.dart @@ -24,7 +24,7 @@ class LchColorSpace extends ColorSpace { const LchColorSpace() : super('lch', const [ LinearChannel('lightness', 0, 100), - LinearChannel('chroma', 0, 100), + LinearChannel('chroma', 0, 150), hueChannel ]);