File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ defmodule Scenic.Color do
180
180
181
181
Most of the time, you will use one of the pre-defined named colors from the
182
182
Named Colors table. However, there are times when you want to work with
183
- other color formats ranging from simple grayscale to rgb to hsl.
183
+ other color formats ranging from simple grayscale to rgb to hsl.
184
184
185
185
The following formats are all supported by the `Scenic.Color` module.
186
186
The values of r, g, b, and a are integers between 0 and 255.
@@ -543,11 +543,12 @@ defmodule Scenic.Color do
543
543
h = rgb_to_hue ( r , g , b )
544
544
l = ( max + min ) / 2
545
545
546
- s =
547
- cond do
548
- delta < @ epsilon -> 0.0
549
- true -> delta / ( 1 - abs ( 2 * l - 1 ) )
550
- end
546
+ s = if delta < @ epsilon do
547
+ 0.0
548
+ else
549
+ delta / ( 1 - abs ( 2 * l - 1 ) )
550
+ end
551
+
551
552
552
553
{ h , s * 100 , l * 100 }
553
554
end
You can’t perform that action at this time.
0 commit comments