I'm currently creating a logo sequence in c++ with SFML and would like to input a desired time and then fade for that amount of time say for example, if the input is 3 then fade out the color until the 3 seconds is up. The max amount of the color integer, as a color is at 255 as white. This is my current code:
sf::Time fadeCalc = clock.getElapsedTime();
int f = fadeCalc.asMilliseconds();
int l = logoLength.asSeconds();
int iColor = "Equation needed using variables"
sf::Color fadeColor(iColor,iColor,iColor);
Fade.setFillColor(fadeColor);
Any help would greatly be appreciated! I'm sorry I couldn't figure out a way to explain it easier.