Different people will sort a color palette in different ways. Our goal was to find a sorting mechanism that looked pleasing to the eye, but of course the results are completely subjective.
- For aesthetics, we prefer the YIQ sort. It highlights trends in value change, but information about hue variation is hidden and sometimes invisible.
- To communicate more information about hues, HSV sorting is by far superior, but it lacks the pleasant gradient-effect of the YIQ sort.
- RGB sorting proves inferior to HSV and YIQ, though the results can still be interesting.
- HSV sort is excellent for grouping colors of similar hues, but the IYQ and YIQ sorts also do this well and they can look cleaner than their HSV counterpart.
“web” palette sorted by saturation. see the sortpal pages for fuller versions. It shows a set of color palettes, sorted by the various attributes like it’s redness, or brightness, or saturation. For example, in the “red” row, the reddest colors are at the far left and decreasingly red colors to the right. The width of the color depends on the number of colors in the palette.
Lots of ways to sort them mathematically. Some map well to what people perceive as correct. Some do not. e.g. web palette sorted by proximity in rgb colorspace:
Different color palettes can be chosen, including the 216 “web safe” palette (wiki), theX11/css “named” colors (wiki), the xkcd color survey (xkcd color survey), a rough approximation of the spot colors often used in print, a Hilbert curve through rgb space(wiki), misc artistic palettes, etc.
- Sorting by one component of a color space, the most obvious being the red, blue, green values of RGB:
- Hue, saturation, and value (HSL and HSV) is another color space, that maps a lot more naturally to how people understand colors. e.g. web palette sorted by hue, saturation, value, lightness, respectively.
- sorting by proximity in the 3d color space. The idea being to start at the origin, and find the closest colors in 3d.
The code is up at github. No promises to it’s correctness or functionality. secondary and tertiary parameters sort as well (hsv3d, and chroma ) mostly just to stabilize the sorts.