Bright blue RGB vector?

Started by
2 comments, last by Ivan Mandic 15 years, 3 months ago
I am trying to output a bright (almost white) color in a fragment program. When I do: color.rgb = float3(0.0,0.0,1.0); I get a pure blue. But when I do: color.rgb = float3(0.0,0.0,0.5); I get a darker blue. Is it not possible to get brighter blue than: color.rgb = float3(0.0,0.0,1.0); ?
Advertisement
Try adding some to the red and green components--e.g. (0.5, 0.5, 1.0). White is an addition of red, green, and blue, so to get a color that is almost white, some of each of these colors must be added.
if you're not comfortable with how colors are defined and look, id recommend opening photoshop or alike, and using their colorpicker to get to the color you want. quick and easy reference with all kinds of colorformats (including of course rgb). find the blue you want, click on it, and you can directly read the rgb values
You can make something like this:

Color make_color(float Red, float Green, float Blue)//Color is the name of data structur
{
Color color.rgb = float3(Red/255,Green/255,Blue/22);
return color;
}

You can use "Ms Paint" to see what is RGB of the color you want.

This one is nice:
Color NiceBlue;
NiceBlue = make_color(100,180,255);

This topic is closed to new replies.

Advertisement