Advertisement

Colors to Numbers C++/Torque game engine

Started by July 09, 2006 07:28 PM
2 comments, last by annerajb 18 years, 5 months ago
First thank you for your time and assistance. I am trying to find a cheat sheet or a formula to understanding Torque (based on C++) color scheme. I know one exists for HTML, but I have not been able to find one for C+. Essentially Torque has lines of colors that range from 0.0 - 1.0 So you might have 0.1 0.5 0.6 0.0 0.5 1.0 0.9 etc... Any clues?
usually those are RGBA values in floating point (ranging from 0.0 to 1.0)

so

1.0 0.0 0.0 ??? would mean brightest red

1.0 0.0 1.0 ??? would mean bright purple / magenta

etc ...

0.5 0.5 0.5 would be a middlish gray.
Advertisement
I would assume 0.0 is equal to 0 in a channel, 1.0 is equal to 255 in a channel. So essentially its the same as the 0-255 or hexadecimal color notations:
Red Green Blue in that order.
But instead of 0-255, or 00-FF, its 0.0-1.0.
1.0 0 0 should be red, 0 1.0 0 should be blue, 1 1 1 should be white, etc,
I'd also assume the fourth number is the alpha channel, where 0 is black and 1 is white.
So for your example, the first number would be a dark turquise which is completely transparent, for your second, a violet-purple color with no alpha channel.

I am just guessing here, so I may be wrong.
-------------www.robg3d.com
render monkey includes a tool so u can visualize the color and take the values they are RGBA red green blue and alpha
heres the site
http://www.ati.com/developer/rendermonkey/sdk.html
and heres the pic
http://www.ati.com/developer/rendermonkey/images/SDK/ColorEditor.jpg
check the floating point box and it will give the values in floating point

This topic is closed to new replies.

Advertisement