Hacker Timesnew | past | comments | ask | show | jobs | submitlogin
Clashes between web and X11 colors in the CSS color scheme (wikipedia.org)
66 points by mmoogle 10 months ago | hide | past | favorite | 28 comments


I never use color names (except if I quick want to set a color in CSS for testing purposes) so I wonder who is using color names and why? Does all this has any real world implications?


I used to use them in both X11 and CSS way back in the day. They were really common in X11, because a lot of users were on pseudocolor displays and it made sense to reuse colors as much as possible.

If you used uncommon colors in your program on - for example - a Sparcstation 20, the palette would shift every time you moved the mouse in or out of your window. It's difficult to describe to someone that's never seen it, but it's unpleasant. No one mourns the death of pseudocolor.


Here is a youtube video for Windows 3.1 on 16 color palette EGA:

https://www.youtube.com/watch?v=ATMVrHfrus8


Pseudocolor was a different thing. The palette wasn't fixed. The adapter could display any color in a 24-bit color space, but only 256 colors at once. So if you had one program that used one palette and another program that used a different palette on the screen at the same time, whichever program wasn't active would have its colors scrambled.

Windows never used pseudocolor as far as I know.


On the CSS side, I sometimes use named colors as an anchor point. Like when writing a dark mode and thinking "that text might look good in yellowish" I set "amber", and the result was good enough to keep it. Other times it makes for a good challenge, limit your design options to only named colors to not get lost in the color wheel.


As a casual user and coder, I use them, because I don't know what #FF00FF or #00FFFF look like, but I do recognize magenta or cyan instantly. Though, support for hexcodes has become better in editors, so it's now a mixed experience.


As touched on in the article, the beauty of colour names would be that they’re celebrated for the machine.

#124356 might look different on one monitor or workstation compared to another.

Having colour names which are calibrated for the device makes a lot of sense. Assuming those colour names are actually calibrated, which as the article also mentions, so often wasn’t the case.

As an aside, this is a big problem in DTP where your display should match the page. However you obviously wouldn’t use colour names in that specific industry because you’re dealing with a vastly greater range of colours and shades.


CSS named colors are just aliases for specific RGB values. They are not any more calibrated than using those RGB values directly.


In the case of CSS specifically, that’s right. But the practice of assigning names to colour values predate CSS by quite some time. And the reasons for doing so are what I’ve described.


Nitpick: you absolutely would use colour names in that industry - it's just that the colour names would be more along the lines of "Pantone 137C" than "Yellow".


In desktop publishing or other graphic arts where you are sending your files to pre-press for physical printing you would use CMYK or Pantone (for spot colours) + paper grade.


Default system theme in browser uses x11 colour scheme, atleast in Firefox


The definition of grey is totally debatable, but in W3C spec Green = #008000 (instead of #00FF00, which is called Lime?) makes no sense.

How did it happen?


My guess? Most green things you see are a darker green. The extremely bright green (lime according to the W3C) is less useful, so they probably chose the color based on what they thought the user would expect.

Given that RGB is well-known, I suspect their assumption was wrong, but I have nothing to back that up.


Also, green is the brightest primary after accounting for typical human vision and typical monitors. The YUV formulas put at nearly twice as bright as red.

So a normal display has more green than you'd need, and 00ff00 green has terrible contrast against ffffff white


Extra nitpick.. green isn't even a primary colour. Red, Yellow, Blue are the primary colours that our eyes perceive. Perhaps this contributes to why the RGB numbering doesn't meet human perception of green?


Those are primary pigment colors (arguably... Should be magenta, cyan, and yellow). Those remove light to make color. Red, green, and blue are the additive primary colors.


No you have S, M and L cones in your eyes, which represent (roughly) blue, green and red. Your eyes are most sensitive to green and yellow because the spectrum of the M and L cones overlaps. This is why a lot of sRGB is green and why the Bayer pattern has one red, one blue and two green elements. Red, yellow and blue are the primary colors used in art education.


> typical human vision and typical monitors

Examples ? My "typical human vision" is worse than it was some years ago and my "typical monitors" are different with every iteration.


> they probably chose the color based on what they thought the user would expect.

just like everything in SW development in the last 10 years. SW is supposed to be an engineering discipline, not a witchcraft.


A #00ff00 green is gonna be much, much brighter and more intense than a #0000ff blue. If we call #0000ff "blue", it makes sense that the color called "green" should be of similar brightness/intensity to the color we call "blue".

Not that it's very consistent. The color called "red" is #ff0000, which looks brighter than both #008800 and #0000ff IMO. And arguably, "blue" shouldn't be #0000ff, since that's just not a very pleasent color. I think I might've been tempted to go with something like, red = #cc0000, green = #008800, blue = #0055ff. Or maybe go all the way and specify the colors in some perceptual color space rather than using RGB. But oh well.

(The color #0000ff for "blue" is super over used IMO. Most terminal emulators default to it as well and it just makes blue text hard to read in most out-of-the-box configurations. To get a nice blue color, you need some green in there.)


The naming is supposed to make sense for humans, not machines. Technically the "greenest green" from a technical POV is #00FF00, but the humans understanding of "green" is something more like #008000.


> the humans understanding of "green" is something more like #008000

That claim feels wrong. Colours are a concept on the level of the culture, not on the level of the species.


The humans at MIT's Project Athena, then.


In Unity3D Game Engine, "Yellow" as a named color is not #ffff00 but #ffeb04, the documentation says "RGBA is (1, 0.92, 0.016, 1), but the color is nice to look at!". I bet this bit the ass of thousands of developers that used it assuming it would be #ffff00 and then wondering why the output color somewhere was wrong.


This comes from the original HTML 3.2 spec (1996) which defined 16 colors matching the Windows VGA palette, where pure #00FF00 was deemed too bright for general use, so they chose the more muted #008000 for "green" and later kept it for backward compatibility.


The wonders of standards-committee bike shedding?


Nonsense. Each are in their own namespace. You can't expect something as debatable as color names to share the same values in different namespaces.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: