G
godfatherofsoul
This probably isn't the best newsgroup for this question, but it's
something I've always been curious about. A while back, I wanted to
programmatically create a rainbow-like status bar. One end would be
red and the far end would be blue. Depending on the status percentage,
only a certain amount of color would be draw (from left-edge red all
the way up to right-edge blue). I wanted to create it programmatically
so that the dimensions of the image could change. However, I could
never figure out the correct RGB/x-coord formula to generate a
nice-looking rainbow. So, assuming a width of 100 pixels at x=0 I'd
use RGB(255,0,0) and for x=99 RGB(0,0,255). Any clue how to solve this?
something I've always been curious about. A while back, I wanted to
programmatically create a rainbow-like status bar. One end would be
red and the far end would be blue. Depending on the status percentage,
only a certain amount of color would be draw (from left-edge red all
the way up to right-edge blue). I wanted to create it programmatically
so that the dimensions of the image could change. However, I could
never figure out the correct RGB/x-coord formula to generate a
nice-looking rainbow. So, assuming a width of 100 pixels at x=0 I'd
use RGB(255,0,0) and for x=99 RGB(0,0,255). Any clue how to solve this?