Hello. In game, I often use some "flash" effects, or fading animations, where I change sprite/shape color like this:
sf::Color color = sprite.getColor();
color.a++;
sprite.setColor(color);
It will be very nice and useful if addColor method exists:
sprite.addColor(0,0,0,1);
What's wrong with the normal colour addition?:
sf::Color color(255, 255, 255, 0);
color += sf::Color(0, 0, 0, 1);
So, for your example it would be just:
sprite.setColor(sprite.getColor() + sf::Color(0, 0, 0, 1));