Thierry

Thierry

  • NA
  • 5
  • 0

Go from one color to white programmatically?

Mar 23 2009 11:08 PM
Hi all, I'm trying to derive (programmatically) a given color i.e. (red, blue, green, brown, etc...) always down to white but I want the color to degrade slowly from let's say Green to White in a number of steps. So it would go something like this: Dark Green . Light Dark Green . . Medium Green . Light Green . White And the same with red, or any other color for that matter. I thought I could take a color such as Green, get its argb equivalent, take away the White argb from it and divide by 10 (for example) to get the "color step" and use this starting from Green and then loop 10 times every time subtracting the "color step", but that does not seem to work I've been playing (really badly I have to say) with pens, colors, argb, etc... but without any luck. Am I making sense? If so, can provide some light on the topic or an example would be even better? Thanks. T.

Answers (4)