|
|
|
|
|
by daxterspeed
2456 days ago
|
|
An interesting issue is that it's currently impossible to pick the direction of the hue rotation, so if your start and end colors are one opposite sides of the hue circle this tool will go "the long way around". Great for rainbows, not so great if you want to go from orange to purple over red. |
|
The critical properties are:
* It's a vector space, so mixing colors means mathematically mixing the components. There is no polar angle that can "go around the wrong way", or suddenly cause the interpolation to change when one color coordinate crosses zero degrees.
* It's perceptually uniform, so that taking mathematically even steps in color space means the result will be perceptually even as well (compare to color spaces which don't account for gamma, and small change on a dark color make a huge difference, but the same step in a light area is invisible).
* Because of the perceptual uniformity, there are no luminance dips or peaks in interpolated colors. In RGB, for example, interpolating two saturated colors which are far away from each other on the color wheel will result in dark grey or black in the middle of the gradient— not so with Lab. Also, consider an HSV rainbow: If you desaturate it, it isn't a uniform grey– some parts of the wheel are randomly brighter than others, because the human eye is more sensitive to yellow and green light, and very insensitive to blue. A rainbow with constant L coordinate in Lab space will have constant luminance.
* Because chromaticity is a 2D vector space in Lab color (rather than a single coordinate), interpolating between two distant hues won't put crazy unrelated hues in between them, but HSL and HSV will. Saturated, complementary colors will appropriately interpolate through a neutral grey in Lab, instead of through a "random" saturated hue.
Here's [1] an image of some constant-luminance (i.e., constant "L" coordinate) slices of Lab space, to give a sense of what it looks like.
Here's [2] a little color picker (found with a Google search) which shows you the results of interpolating in different spaces— you can see that RGB is pretty bad, but in HSV or HSL it's not hard to make something look extremely broken. Those two spaces are definitely the wrong choice for interpolation.
[1] https://en.wikipedia.org/wiki/CIELAB_color_space#/media/File... [2] http://davidjohnstone.net/pages/lch-lab-colour-gradient-pick...