Skip to content

Commit

Permalink
make saturation change multiplicative
Browse files Browse the repository at this point in the history
  • Loading branch information
undertherain committed Sep 2, 2018
1 parent be30172 commit 8990cd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contextfree/contextfree.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def __enter__(self):
hue, lightness, saturation = colorsys.rgb_to_hls(r / 255, g / 255, b / 255)
hue = math.modf(hue + self.hue)[0]
lightness = math.modf(lightness * self.lightness)[0]
saturation = math.modf(saturation + self.saturation)[0]
saturation = math.modf(saturation * self.saturation)[0]
r, g, b = colorsys.hls_to_rgb(hue, lightness, saturation)
a = min((a * self.alpha), 255)
rgba = [r * 255, g * 255, b * 255, a]
Expand Down

0 comments on commit 8990cd5

Please sign in to comment.