Color c++

I'm making this bouncing ball in c++ and SDL, but I want the .png ball to gradually change color, is there a code that makes me able to do that?
You would need to define what it means for something to change color. You might want to read this: http://en.wikipedia.org/wiki/HSL_and_HSV
The best thing you can do is have code that creates the properly-colored sprite image according to f(t). The simplest way would be to have an alpha image that you apply to an image of the proper color to generate the new ball image. Be careful to do this properly, or it can negatively affect your game's performance...
Topic archived. No new replies allowed.