diff --git a/color_HSL_adjust.py b/color_HSL_adjust.py index 303b1f39d188f42d1de5c59c3edceacf3f12e20d..1425ba0d6530ba046c9530229b36d8efa299f7b6 100755 --- a/color_HSL_adjust.py +++ b/color_HSL_adjust.py @@ -19,7 +19,7 @@ class HslAdjust(inkex.ColorExtension): if self.options.random_hue: color.hue = int(random.random() * 255.0) elif self.options.hue: - color.hue += (self.options.hue * 2.55) + color.hue += (self.options.hue * 256.0/360) if self.options.random_saturation: color.saturation = int(random.random() * 255.0) diff --git a/tests/test_color_HSL_adjust.py b/tests/test_color_HSL_adjust.py index bd0753dfe9323c649f2f21e057a36b89309691ce..5b01f408bd3f18a1166230e815e7c88d18b4640b 100644 --- a/tests/test_color_HSL_adjust.py +++ b/tests/test_color_HSL_adjust.py @@ -9,11 +9,11 @@ class ColorHSLAdjustTest(ColorBaseCase): ((255, 255, 255), "#ffffff"), ((0, 0, 0), "#000000"), ((0, 128, 0), "#008000"), - ((91, 166, 176), "#5a74af", ['-x 10']), - ((91, 166, 176), "#745aaf", ['-x 320']), + ((91, 166, 176), "#5a98af", ['-x 10']), + ((91, 166, 176), "#5aaf80", ['-x 320']), ((91, 166, 176), "#5ba6b0", ['-x 0']), - ((91, 166, 176), "#af5a6c", ['-x 12345']), - ((91, 166, 176), "#5aacaf", ['-x -1']), + ((91, 166, 176), "#af5a78", ['-x 12345']), + ((91, 166, 176), "#5aa8af", ['-x -1']), ((91, 166, 176), "#4eafbb", ['-s 10']), ((91, 166, 176), "#0be5fe", ['-s 90']), ((91, 166, 176), "#5ba6b0", ['-s 0']),