|Copyright||(c) 2013 Brent Yorgey|
|License||BSD-style (see LICENSE)|
Utilities for working with color in HSV space.
Right now, the only utility is a function for blending colors in HSV space. This has the effect of "travelling around the color wheel", which can be especially nice when one wants to blend smoothly from one color to another (blending in RGB space can tend to travel across some icky brown/grey colors).
Blend two colors in HSV space---that is, linearly interpolate
between their hues, saturations, and values independently
(wrapping around appropriately in the case of hue). In
hsvBlend a c1 c2 is like doing
(a-1)*c1 + a*c2 in
HSV space. That is, a parameter of
0 results in only the first
1 results in only the second color; and anything in
between results in a blend.