Jump to content
  • Advertisement
Sign in to follow this  
raptorstrike

SDL_Surface hue changes

This topic is 4814 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

Ok I want a lot of diffrent colors of a picture but instead of going through the tedious work of converting all the colors exactly to a diffrent shade I figured out that if you take a color and change only the hue you get a diffrent color of the same shade, Im sure its quite complicated exactly how hue works but is there a way to find this value in a surface, or do you just have to modify the pixle color values? Is there actually a formula for hue conversion from one color to another? i.e RGB(240, 100, 50) Hue = 11; now lets say that I want to increase the hue, but didnt have a hue value, by what amounts do I increase the R,G,B respectavly? I worked at it for a while, its a VERY complicated formula that I never really figured out. Anyone know how this works? thanks =) looking back at my post its kind of confusing so ill try to clarify I want to ajust the Hue of a SDL_Surface. Problem is: there is not Hue value for SDL_Surface. Hue is just a number that you increase that has an effect on the RGB through a complicated formula. Anyone know what this formula is?

Share this post


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