@@ -6,21 +6,23 @@ and averaging each channel independently. Additionally, by default, transparency
66premultiplication which weights the colors such that more opaque colors have a greater significance in the mixing vs
77more translucent colors.
88
9- ![ Average RGB] ( images/avg-rgb.png )
10-
11-
129Averaging under ColorAide can take as many colors as desired and will return a color that represents the average. This
13- is not to be confused with interpolation which employs a different technique. One thing that sets it apart from
14- interpolation is that when performing the operation, the order of the colors does not matter and will yield the same
15- results even the colors are shuffled.
10+ approach to mixing is not to be confused with interpolation which employs a different technique. One thing that sets it
11+ apart from interpolation is that when performing the operation, the order of the colors does not matter and will yield
12+ the same results even if the colors are shuffled.
1613
1714Averaging can be used as a way to mix multiple colors into one color or simply determine what the overall average color
1815is from a set of colors. Results are subject to the geometry of the color space in which the average is performed.
1916
2017## Rectangular Space Averaging
2118
22- ColorAide, by default, averages in the rectangular Linear sRGB color spaces. If desired, other color spaces can be used.
23- Results will vary due to the geometry of the color space being used.
19+ ColorAide, by default, averages colors in the rectangular Linear sRGB color spaces. For most, averaging in rectangular
20+ spaces would most likely be the common approach.
21+
22+ ![ Average RGB] ( images/avg-rgb.png )
23+
24+ While linear sRGB is the default color space when averaging, other color spaces can be used. Results will vary due to
25+ the geometry of the color space being used.
2426
2527``` py play
2628Color.average([' red' , ' blue' ])
@@ -37,10 +39,14 @@ Color.average(['red', 'yellow', 'orange', 'green'])
3739## Cylindrical Space Averaging
3840
3941ColorAide can also average colors in cylindrical spaces. When applying averaging in a cylindrical space, hues will be
40- averaged taking the circular mean. Due the difference in approach, colors can be quite different.
42+ averaged taking the circular mean. Due the difference in approach, color averaging in a cylindrical space can be quite
43+ different.
44+
45+ ![ Average HSL] ( images/avg-hsl.png )
46+
47+ To perform averaging in a cylindrical/polar space, simply specify the space when averaging.
4148
4249``` py play
43- Color.average([' purple' , ' green' , ' blue' ])
4450Color.average([' purple' , ' green' , ' blue' ], space = ' hsl' )
4551```
4652
0 commit comments