diff --git a/lib/src/functions/color.dart b/lib/src/functions/color.dart index f157be985..fa43d6f58 100644 --- a/lib/src/functions/color.dart +++ b/lib/src/functions/color.dart @@ -66,7 +66,7 @@ final global = UnmodifiableListView([ }), // ### HSL - _hue, _saturation, _lightness, _adjustHue, _complement, + _hue, _saturation, _lightness, _complement, BuiltInCallable.overloaded("hsl", { r"$hue, $saturation, $lightness, $alpha": (arguments) => @@ -117,6 +117,12 @@ final global = UnmodifiableListView([ return color.changeHsl(saturation: 0); }), + BuiltInCallable("adjust-hue", r"$color, $degrees", (arguments) { + var color = arguments[0].assertColor("color"); + var degrees = arguments[1].assertNumber("degrees"); + return color.changeHsl(hue: color.hue + degrees.value); + }), + BuiltInCallable("lighten", r"$color, $amount", (arguments) { var color = arguments[0].assertColor("color"); var amount = arguments[1].assertNumber("amount"); @@ -239,7 +245,8 @@ final module = BuiltInModule("color", functions: [ }), // ### HSL - _hue, _saturation, _lightness, _adjustHue, _complement, + _hue, _saturation, _lightness, _complement, + _removedColorFunction("adjust-hue", "hue"), _removedColorFunction("lighten", "lightness"), _removedColorFunction("darken", "lightness", negative: true), _removedColorFunction("saturate", "saturation"), @@ -355,13 +362,6 @@ final _lightness = BuiltInCallable( (arguments) => SassNumber(arguments.first.assertColor("color").lightness, "%")); -final _adjustHue = - BuiltInCallable("adjust-hue", r"$color, $degrees", (arguments) { - var color = arguments[0].assertColor("color"); - var degrees = arguments[1].assertNumber("degrees"); - return color.changeHsl(hue: color.hue + degrees.value); -}); - final _complement = BuiltInCallable("complement", r"$color", (arguments) { var color = arguments[0].assertColor("color"); return color.changeHsl(hue: color.hue + 180);