CSS named colors have the most weird names ever! Color names are like lightgoldenrodyellow, papayawhip , mediumvioletred , blanchedalmond just to name a few..
More here: http://www.crockford.com/wrrrld/color.html
This kinda makes a lot of these colors unusable. is there a reason behind this? or is it just plain stupid?
I'm guessing you don't like Pantone colors or car paint colors either? Things have names... You don't need to use those names. You can always use hex, rgba, or hsla to specify colors.
I've never seen them used in production, people just use hex, rgb, etc.
Named colours are useful as a hint that the code might be temporary, eg. I use named colours only for debugging, so if anyone on my team sees a named colour they know something has been accidentally left in.
They're also good to inject some humour into a dry code example, eg in presentations or documentation.
An exception to the names being sourced from x11 is rebeccapurple - a tribute colour with a very specific history.
I love them, I use lime as my positive test result color, and hotpink as an alternate. I love black and white compared to other representations of them, and I have a little page with all of the named colors staticresource.com/colors.html that I sometimes use if I'm shopping and trying to match stuff and there happens to be a color close, I can sent that to somebody else and they can compare. It's a fun list, but it isn't very well rounded.
I dunno, I don't go out of my way to use them if I want to express a colour in a different way, but if you know the name, something like l-i-m-e is just so fast and easy to type :D
EDIT: Here's a list of all of the CSS named colors that are shorter than their hex representation that my friend Maxime included in his mini CSS minifier: github.com/xem/miniMinifier/blob/gh-pages/css/scr…
Want real fun? On modern displays the colours also show wrong.
Originally in CSS there were only 16 colours, and those were taken from the origianal RGBI CGA colourspace. Officially until CSS3 the other named colours from the X Windows specification were not supported, though most browsers did.
But because they came from X11 there's a problem -- Traditional "Real UNIX" X Windows workstations are tuned to 6500 degree colourspace. Modern displays are tuned closer to blue pushing from 12K to 15K. As such "brick" is now just red, not brownish-red as the colours are no longer shifted red-towards-green.
That's why a lot of '90's CRT's have a "temperature" setting option since "real" Unix loved the washed out sickly 6.5K colourspace, whilst RoW (Rest of World) actually did this crazy thing of trying to keep blue actually blue, red actually red, and green actually green.
The advantage of the 6.5k though being that each colour channel is (or should be) mapped to the same luminosity max, so that 100% on the blue channel is as bright as 100% on the green channel. In a pure high temperature mapping such as VGA standard blue has only 19.4% the visible luminance of pure green. Some -- like those coming from a chroma standard -- found this easier to deal with, but in practice it was quickly rejected as impractical, limited, and harder to tune displays for properly.
It's much akin to the difference between "European" and "North American" colour conversion where to those in the NTSC world PAL video always looks muted and washed out in colour, whilst going the other direction the NTSC looks garish and lacking in detail. Laugh is some games in the early LCD days -- like Gothic 3 -- actually had a setting to let you switch between palettes better suited to each region's norms and preferences.
So basically, unless you're on a old Sun Blade Workstation, late model NeXT, or a SGI rig, when you use the named colours you are NOT seeing what they're actually supposed to look like.
Personally, I have NEVER used the named colours by choice. Maybe it's because I programmed 4 bit, 8 bit, and 24 bit displays directly from Machine Language meaning I had to work in RGB, but for me RGB is second nature. I can think colours in RGB quick and easy... especially if I limit myself to the 12 bit colourspace of 3 digit hex.
Mike Cornish
JS Developer • CSS Lover • UX Explorer
Summary of the article that @bmlyon posted:
As far as I can tell, some dude plagiarized the color names from a paint company and developers used them because they didn't like hex or rgb values. Then, when W3C wrote the CSS spec, they basically said, "Well, if this is what you guys are already using, might as well make it official." A lot of people thought the names were stupid, but W3C stuck to their guns. So don't worry, you're not alone in wondering where the heck those names came from.
Relevant quotes: