Hello. I am trying to generate a spectrum color as a texture starting to 0, 0 (pure white) to integers screenWidth and screenHeight (black). My texture is pixelated and each pixel can be “painted” using a single loop. So I have something like that :
for (int x = 0; x < ScreenWidth(); x++)
{
for (int y = 0; y < ScreenHeight(); y++)
{
r = uint8_t for red
g = uint8_t for green
b = uint8_t for blue
Draw(coordinate x&y),PaintPixel(r, g, b));
}
}
How should I compute R, G and B in order to reach this picture as a example :
Thank you for your help ++