Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Ructions

Colours

This topic is 5236 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 was wonder how many colours can you get by using glcolor and whats the float values for them all thanks in advance ructions

Share this post


Link to post
Share on other sites
Advertisement
In 32bit colormode you get 16777216 RGB or 4294967296 RGBA colors... do you want me to write them to you?

You should never let your fears become the boundaries of your dreams.

Share this post


Link to post
Share on other sites
open up a program like MS paint and then open a colour picker. It should have a ''define custom colour'' option, which will bring up some extra stuff that will include Red, Green and Blue values for the colour you have chosen. These are between 0 and 255. Therfor, to get the same colour with glColour, simply divide these values by 255 (so they are in the range 0-1)

eg, orange is Red=255, Green=128, Blue= 0

so the colour with glColour is:

glColour3f(1.0f, 0.5f, 0.0f);



| - My project website - | - email me - |

Share this post


Link to post
Share on other sites

  • 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!