PDA

View Full Version : predefined colors include file



sandyrepope
25-06-2008, 04:10
My fingers are so tired and sore. I've been gathering up a list of color names and their rgb numbers. I thought it would be nice to be able to include this file and then when you want a certain color in your program all you would have to do is just type in the name of the color. For example, if you wish to use something like sea green then all you would have to type in would be %seagreen or %darkblue. I've got about half the file done so far and will post the completed file when it is done.

I didn't realize that there were so many colors to define.

I know that this is something I'll use but whether it will be of any interest to anyone else, I don't know.

If someone else had done a file like this would you let me know?

Thanks
Sandy

ErosOlmi
25-06-2008, 06:58
Hi Sandy,

it can be interesting. I do not know if worth all the hard work. Maybe there is some page source on the web we can use in order to parse name and RGB value. For example the following URL: http://cloford.com/resources/colours/index.htm
reports a list of more than 500 color names.A script can read it and parse needed values.

Attention about possible copyrights notices.

Eros

sandyrepope
25-06-2008, 22:46
I do not know if worth all the hard work.
I don't know if it is or not. I do know that I'd like to have it in my programs. The only reason I mentioned it on the forum was to see if anyone else liked the idea.


Attention about possible copyrights notices.
I'm not sure exactly what you are talking about. Can colors be copyrighted? Please explain what you had in mind when you said this, please.

Thanks
Sandy

Michael Clease
25-06-2008, 23:39
I think Eros was talking about the website.

your %seagreen is that Mediterranean green sea or british isles sea green? I would see them as totally different things.

But I would say if you want to use it for your programs there is no reason not to.

kryton9
26-06-2008, 02:12
Sandy, I am sure you can find this work done to use already. It will save you lots of time and also save you from coming up with names for so many colors. There are lots of them for sure.
Here is Microsoft's list for xna color, it gives the name and the rgb values for the colors.
http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.color_members.aspx

ErosOlmi
26-06-2008, 10:17
I'm not sure exactly what you are talking about. Can colors be copyrighted? Please explain what you had in mind when you said this, please.

I was referring about a script to use in order to catch a web page where to download from. In this case the web page can have some copyright notice.

Here a link to a page that contains uge links to color pages: http://tx4.us/moacolor.htm

Ciao
Eros

sandyrepope
26-06-2008, 16:05
I was referring about a script to use in order to catch a web page where to download from. In this case the web page can have some copyright notice.

I must admit that this idea never occurred to me. I was not aware that this was possible.

Perhaps I wasn't clear about what I was talking about. All I was thinking about was having predefined colors and not having to type in these definitions all the time. Here is an example of what I meant.


%blue = rgb(0, 0, 255)
%blue1 = rgb(0, 0, 238)
%blue2 = rgb(0, 0, 205)
%blue3 = rgb(0, 0, 139)

As you can see, it doesn't have anything to do with web pages.

Thanks
Sandy

ErosOlmi
26-06-2008, 16:08
And it is a great idea.
If you will produce such file, consider I will be happy to add it into official thinBasic distrubution under \thinBasic\Inc\ directory.

Ciao
Eros

Petr Schreiber
26-06-2008, 17:06
Hi,

here is a list of HTML and X11 ( I think that is what sandy wants ?) colors by name, could be handy.
I am not sure if I would remember some of those by name, RGB is RGB :)


Bye,
Petr

sandyrepope
26-06-2008, 23:36
Here is the file I've been working on.

I'd like to get some feedback about it.

Thanks
Sandy

Petr Schreiber
27-06-2008, 15:17
Hi sandy,

thanks a lot for new header.
I think the problem is, that in 2 different color naming conventions the gray for example means other color:
HTML gray = 128,128,128, in X11 and your colors gray = 190,190,190. Now what is "right" :)


Thanks,
Petr

Michael Clease
27-06-2008, 18:07
Petr dont you mean colour and grey ;D

Petr Schreiber
27-06-2008, 22:38
I am sorry Abraxas,

I forgot my favourite English is the british one, of course ;D
But imagine ... I saved one byte in each word ;)

I know I am generating even hybrid of "American" and "British" English sometimes. It's not me ... naaa ... it is the internet which deformed me like that. I am innocent, do not shoot :P


Petr

sandyrepope
27-06-2008, 23:57
HTML gray = 128,128,128, in X11 and your colors gray = 190,190,190. Now what is "right"

I think that since there isn't a standard some colors can be made using different number combinations. It is my understanding that gray/grey can be made more than one way.


Petr dont you mean colour and grey

Like Petr, I usually use one or the other. :)

Sandy