At 04:29 PM 8/23/03, Peter Bochan wrote:
Hi Lingo Developers!
I was just curious how can I figure out the list of RGB colors codes?
Should I make up a loop in Director that will show me that index or is
there another way to accomplish that?


If you are talking about the indexed 256 colors in a given palette, then you would need to loop through and check each one.

Otherwise there is no "list", but it may help you to understand how they are given. A color code like #FF0000 is pure red. This number is in hexadecimal, where each section is two letters/numbers. There are three sections - red, green, and blue. They are in order as in #RRGGBB.

So a six-character code like #930FA2 is really broken down to Red: #93, Blue: #0F, Green: #A2

The codes run from 00 to FF. FF is the representation for 255. The numbers go 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. So "F" is really 15. 16 would be "10" (1 in the 16th place, 0, for nothing more). "11" hex is 17 decimal. "FF" hex is 255, as high as a byte-pair will go.

#000000 is all channels (red/green/blue) are at 0, so the color is black.

#FFFFFF is all channels (red/green/blue) are at FF, so the color is white.

Even values all across, like #888888 would be a grey (red/green/blue at equal power). #222222 would be a darker (closer to 0) grey than #EEEEEE.

Anything else is a mix of various strengths of red, green, blue. If only one pair is "on", like #00AA00, then only one color (in this case, green) is active, so it's a fairly bright green, but not as full strength as #00FF00, which would be pure green.

So that's roughly how it goes. Usually if you need a particular color it's easier to make the color and use a program to tell you what the RGB code for the color you just made was, but if you want to understand where the codes come from, this is how it works.

- Tab

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to