HTML Color Codes: Red to Yellow to Green
Depending on how many colors you want to end up with, the solution is just to keep incrementing the green value by a certain amount, and then when green is maxed (FF), decrement the red value repeatedly by the same amount. Pseudo-code: int red = 255; //i.e. FF int green = 0; int stepSize = … Read more