First, here are the 140 unique standard colours:
|Colour||X11 Name(s)||Web Name(s)||R||G||B||H||S||L||Y||Shade|
If we plot these colours in RGB space, we see that their distribution is far from even:
The "Shade" column in the table comes from an old revision of the Wikipedia page. I'm not sure what the origin of this categorisation was, but I think it can be improved upon. Firstly, let's define the "whites" group as all colours with HSL lightness values of 95% and above (13 colours). Secondly, we define "blacks" as any remaining colours with HSL saturation of 15% or below (9 colours). Now let's look at the HSL hue of the remaining 118 colours:
|Colour||X11 Name(s)||Web Name(s)||R||G||B||H||S||L||Y||Shade||Group|
In the table above, we've heuristically divided the groups according to HSL hue alone:
|hue < 20°||reds|
|20° ≤ hue < 45°||oranges|
|45° ≤ hue < 75°||yellows|
|75° ≤ hue < 155°||greens|
|155° ≤ hue < 185°||aquas|
|185° ≤ hue < 255°||blues|
|255° ≤ hue < 320°||purples|
|hue ≥ 320°||reds|
This separates the 140 unique colours into nine groups:
There are 216 (mostly-unnamed) web-safe colours limited to six levels for each RGB channel (0%, 20%, 40%, 60%, 80% and 100%). If we reduce the number of levels to five (0%, 25%, 50%, 75% and 100%), we get 125 distinct colours, approximately the number of unique X11 colours. I've named this colour palette RGB-125:
If we plot RGB-125 colours in RGB space, we see the regular grid, as expected:
A 125-colour palette fits neatly into 7 bits with room for a 1-bit alpha mask in every byte.
Reducing the number of levels for each RGB channel to four (0%, 33%, 67%, 100%) creates a 64-colour palette. This is identical to the source palette for EGA video systems. Most of these colours were unnamed, so we have to fill in the gaps:
Reducing the number of levels for each RGB channel further, to three (0%, 50%, 100%) creates a 27-colour palette. This is a strict subset of RGB-125:
The use of prefixes such as "light", "dark" and "vivid" in RGB-64 suggests more rigorous naming schemes can be constructed. Indeed, this is the goal of initiatives such as the ISCC-NBS System of Color Designation.
Let's start by segmenting the cylindrical HSL colour space.
|lightness < L1||return black|
|lightness > L6||return white|
|lightness < L2||prefix = deep|
|L2 ≤ lightness < L3||prefix = dark|
|L4 < lightness ≤ L5||prefix = light|
|lightness > L5||prefix = pale|
|saturation < S1||return (prefix) grey|
|saturation < S2||prefix = dull|
|hue < 15°||return (prefix) red|
|15° ≤ hue < 45°||return (prefix) orange|
|45° ≤ hue < 75°||return (prefix) yellow|
|75° ≤ hue < 105°||return (prefix) chartreuse|
|105° ≤ hue < 135°||return (prefix) green|
|135° ≤ hue < 165°||return (prefix) spring|
|165° ≤ hue < 195°||return (prefix) cyan|
|195° ≤ hue < 225°||return (prefix) azure|
|225° ≤ hue < 255°||return (prefix) blue|
|255° ≤ hue < 285°||return (prefix) violet|
|285° ≤ hue < 315°||return (prefix) magenta|
|315° ≤ hue < 345°||return (prefix) rose|
|hue ≥ 345°||return (prefix) red|
This produces 79 colours segments: six variations for each of the twelve hues, plus seven monochrome. To align the palette as much as possible with RGB-125 whilst keeping the number of RGB points in each category fairly even, we choose:
This, in turn, suggests the following palette:
|Hue||Lightness 0%||Lightness 12.5%||Lightness 25%||Lightness 50%||Lightness 75%||Lightness 87.5%||Lightness 100%||Saturation 50%|
When plotted in RGB space, we see there is a slightly greater concentration towards the black and white corners:
We can also use the HSV colour space instead of HSL. The rules are more complex because of the interactions between the "saturation" and "value" metrics. I've chosen parameters such that each of the 79 segments contains the same number of RGB points. See the code for details.
Whilst performing these experiments, I stumbled across a colour model I hadn't seen before: Alvy Ray Smith's HWB (hue-whiteness-blackness). It's almost isomorphic with HSL but the segmentation rules seem more intuitive, which is probably a good sign. Once you've extracted the hue (e.g. "red" below), all the names are mapped out thus:
Euclidian distances in WB-space are used to determine the closest hue point. This produces a 91-segment palette:
Here's the HWB-91 palette plotted in RGB space:
Although a surprisingly contentious issue, it has been noted that there are approximately eleven basic colour terms in many languages, including English. In typical order of adoption, they are:
|orange||0° — 40°||30°|
|yellow||40° — 100°||60°|
|green||100° — 180°||120°|
|blue||180° — 250°||240°|
|purple||250° — 310°||300°|
|red||310° — 360°||0°|
The hue sectors are no longer equally sized and we introduce the notion of an "archetype" colour. This is a single hue within the named range that best typifies the name. Note that although all hues between 310° and 360° are considered "red", the archetypal "red" is right on the upper limit. The ranges and archetypes were curated from the ISCC-NBS colour list. We now divide our eleven chosen basic colour terms into three groups:
Note that HWB-51 splits up the whiteness-blackness plane using rules when converting from values to names, unlike HWB-91, which uses centroids. HWB-51 uses archetypes to convert from names back to whiteness-blackness values. There are similar planes for "yellow", "green" and "purple". However, "red" and "orange" are slightly different to account for the aliases ("brown" is generally classified as "dark orange" and "pink" as "light red"). For example, for "orange":
There are four aliased names:
Here's the HWB-51 palette plotted in RGB space:
It's very sparse in the cyan corner. Perhaps the addition of a "turquoise" hue sector would solve this. Another tweak could be to add "olive" as an alias for "dark yellow".
Another alternative to HSL space is cylindrical CIE L*a*b* or CIE LChab. However, there are problems with the wider gamut of CIE LChab compared to RGB; keeping within the RGB gamut for all CIE LChab hues produces quite muted colours because you have to reduce the chroma. Also, the differences between the RGB/HSL colour wheel and the CIE LChab colour wheel are quite minor when you're looking at small segments.
Some colour-naming schemes are based on centroids. There are three important aspects of any such scheme:
The ISCC-NBS System of Color Designation defines a dictionary of 267 colour names mapped to Munsell blocks. It is often implemented as a centroid-based system. Paul Centore has done significant work on the Munsell system, including mapping ISCC-NBS centroids to sRGB:
Notice that seven centroids are out-of-gamut with respect to sRGB. The distance metric is typically Euclidian in sRGB space.
The Color Naming System (CNS) is the inspiration for HWB-51 and HWB-91. It has a relatively small vocabulary, but can specify over 600 colours. Unfortunately, details about actual implementation are very scarce. I've guessed at a centroid scheme based around the HSL colour space:
According to the original paper, the distance metric was "NBS Color Difference Units" (assumed to be the Judd-Hunter formula), though no significant differences were found when using simpler Euclidean differences in, say, sRGB. For ease of implementation, I've re-used ΔE*2000.
The 627 generated names have a nasty overlap between "orange" and "brown". What colour is "very dark vivid yellowish brown" anyway? The centroids are quite sparse within the "green-blue" sector as there's no "primary" hue between 120 and 240 degrees.
We can compare the various naming schemes with tables listing the scheme, name and corresponding ΔE*2000 values for each web-safe colour:
It's highly subjective, but to my eyes, in this light, with this monitor, HWB-91 is a good candidate for a simple naming scheme with a limited number of terms. HWB-51 is probably a little too sparse.