diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-02-03 17:02:48 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2021-02-03 17:02:48 +0100 |
commit | 4d40685850ea211ecc0d0d0735b5a4c084333858 (patch) | |
tree | af497c9118243be3b7208cee60afca6de9b5b68a /lib/paperclip | |
parent | 7632255115a7f6e6f9f8047f0d0d1b90d7ee9315 (diff) | |
parent | 4e933924bdea3392ebeaeaa7c341593eb200512c (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'lib/paperclip')
-rw-r--r-- | lib/paperclip/color_extractor.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/paperclip/color_extractor.rb b/lib/paperclip/color_extractor.rb index a70a3d21f..d3b8e1022 100644 --- a/lib/paperclip/color_extractor.rb +++ b/lib/paperclip/color_extractor.rb @@ -55,7 +55,7 @@ module Paperclip # If we don't have enough colors for accent and foreground, generate # new ones by manipulating the background color (2 - foreground_colors.size).times do |i| - foreground_colors << lighten_or_darken(background_color, 35 + (15 * i)) + foreground_colors << lighten_or_darken(background_color, 35 + (i * 15)) end # We want the color with the highest contrast to background to be the foreground one, @@ -147,7 +147,7 @@ module Paperclip g = l.to_f b = l.to_f # achromatic else - q = l < 0.5 ? l * (1 + s) : l + s - l * s + q = l < 0.5 ? l * (s + 1) : l + s - l * s p = 2 * l - q r = hue_to_rgb(p, q, h + 1 / 3.0) g = hue_to_rgb(p, q, h) |