diff options
author | Starfall <us@starfall.systems> | 2021-02-08 15:01:01 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2021-02-08 15:01:01 -0600 |
commit | 3693000bf6a94219e3cc4a29a6cb4ac51b78cf2a (patch) | |
tree | 5e0a9757d315ca3aafe4db1ce10d3c4d84769408 /lib/paperclip | |
parent | ab4c09a7041050e4aa4b8333484e311f26a36b4a (diff) | |
parent | 4ed9576cd28abc033a094fed6babe9825014f1af (diff) |
Merge remote-tracking branch 'glitchsoc/main' into main
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) |