Skip to content

Commit

Permalink
Update for lch() tests (#2108)
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Oct 11, 2023
1 parent 5ea5ab0 commit 5b3de08
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/src/functions/color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/src/value/color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand Down
2 changes: 1 addition & 1 deletion lib/src/value/color/space/lch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
]);

Expand Down

0 comments on commit 5b3de08

Please sign in to comment.