Fog Creek Software
Discussion Board

Is there an international standard for color name?

I'm getting tired of calling my colors dark blue, blue, light blue, lighter blue, etc.  There must be some kind of standard nomenclature, right?

I've found this:

... but I assume it's web-specific.  I was hoping for something PC-, or at least MS Windows-, specific.

Thanks for any pointers.

Thursday, March 27, 2003

There are others out there, too.

Realize that what you see (or call it) is not always what you get, depending on palette depth.


Thursday, March 27, 2003

Perhaps you should ask yourself why you feel the need to name colours?

Hard coding colours in source code is a ridiculously bad practice.

As to configuration files, if they are being written by a developper what is wrong with hex?

If they are being written by an end user, then you need to provide them with a tool to select colours visually. Tools have no trouble with hex.

Anonymous Coward
Friday, March 28, 2003

< Perhaps you should ask yourself why you feel the need to name colours? >

Sigh.  Ohhhh, okay, I'll play... maybe someone with less than 20 years of programming experience is reading, and could learn something...

I guess first of all, I use macros like RGB_GREEN instead of RGB(0,0,255) just because they're easier to read, and are less error-prone.  (Did you catch my error, by the way?)

Secondly, I use macros like RGB_ERROR_PARSING so that I can easily change them globally, without having to grep for RGB(255,117,62) - using regular expressions to account for whitespace, of course.  You'd be amazed how often Marketing wants to fiddle with the color scheme.

<Hard coding colours in source code is a ridiculously bad practice.>

Um, actually, no, not necessarily.  The alternative - let the user pick - sometimes makes sense, and sometimes is a silly waste of everyone's time, and clutters the user interface pointlessly.  It depends on what you're building, and for whom.  Making broad generalizations like that is always bad.  Yes, I'm making a joke.

Anyway, given that I use these macros, and that they have names, it seemed like a Good Thing to use standard names, if they exist.  If "Alice Blue" is a standard color name, why would I use RGB_VERY_VERY_LIGHT_BLUE?

It's a small thing, but the difference between maintainable software, and an undifferentiated ball of amateur brain-dead slapped-together script-kiddie crapware, is made up of such details.  That's the whole point of this website, if you want my opinion.

Friday, March 28, 2003

As far as I know there are named colors for the web and people have given you the list. Not a very good idea though because I suspect the naming depends on the browser.

Visual Basic has color words such as VBBlue and so on  - there aren't that many  though, and it's because of that I presume that Windows doesn't have a standard color name. If you're simply looking for a descriptive name for the color for your own use in code then use the web colors., but still use the hexadecimal when you actually call the color.

Stephen Jones
Friday, March 28, 2003

Whenever I need to do something like this (color name), I refer to the X-Window file rgb.txt.

If you don't have a computer running X-Window handy, I found a copy at

Friday, March 28, 2003

You're fired, and while the security guard is escorting you out of the building, we will examine all your errors for the benefit of those who have less than a year of programming experience.

You begin with an "ad hominem" attack and an "appeal to authority", if your arguments have value they could stand on their own.

Macros? Why, does your programming enviroment not have constants?

You should have a colour data type so that your compiler can catch errors for you.

Now you write:

#define ALICE_BLUE (240,248,255)

Now marketing decides that the "Message Box" should be "Corn Flower Blue" instead, while the "Menu" should stay "Alice Blue". Back to grepping, eh?

So, you've never had a colour-blind user? An early stage case of retinitis pigmentosa? I guess you don't sell very much software.

There is always a reason to let the user pick.

And clutter the user interface? Please, a single item on an option menu that most users will never see.

A good design would have all the graphic objects assigned colours in a single file. Thus:

const colour ActiveTitleBarColour = (10,36,106);
const colour ActiveWindowBorderColour = (212,208,200);
const colour ApplicationBackgroundColour = (128,128,128);

A better design would have those as defaults and over-ride them with an optional configuration file.

Best would have a graphical tool to write such a file. This is hardly a waste of anyone's time as the same tool can be used in all your applications.

Now marketing is happy: thay can fiddle with colours all day long. And development is happy: they no longer have to waste a developer's time every time marketing has a brain wave. And the customer is happy: they can replace marketing's scheme with something that works for them.

"It's a small thing, but the difference between maintainable software, and an undifferentiated ball of amateur brain-dead slapped-together script-kiddie crapware, is made up of such details. "

Absolutely! Now, please tell me the names of your products, I would not want to purchase "an undifferentiated ball of amateur brain-dead slapped-together script-kiddie crapware" by mistake.

Anonymous Coward
Friday, March 28, 2003

This is why I generally don't post to message boards.

I give up.

Please bite me, really hard.

No, harder.
Friday, March 28, 2003

And you know what else?  I agree with practically everything you said.  You're just such a jerk about it, that I can't stand to even read your post.

If you think that was a personal attack, you're a moron, and you have no sense of humor.  Now *that's* a personal attack.  See how that works?

And as far as "appeal to authority" goes (I guess someone whent to college, huh?), saying I have "x" number of years is just a shorthand way of communicating to you that I am not a kid, that I have experience, and that, perhaps, we could communicate as equals.  If you had half a brain, you'd know that.  (Gee, another attack!)

Again, please bite me, you childish loser.

No, harder.
Friday, March 28, 2003

'You are not arguing logically' is the new 'nazi' - guaranteed to stop any discussion coming to a useful conclusion, particularly if you are losing the plot.

ho hum
Saturday, March 29, 2003

*  Recent Topics

*  Fog Creek Home