Jump to content
  • Advertisement
Sign in to follow this  
mlt

Bright blue RGB vector?

This topic is 3543 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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); ?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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);

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!