This entry was posted
on Friday, October 13th, 2006 at 2:11 am and is filed under Linkydinks.
You can follow any responses to this entry through the RSS 2.0 feed.
Both comments and pings are currently closed.
To further generalize, I would set up the function to allow different centers and widths for each color component, which would allow us to produce a rainbow of greens-blues, for example.
[…] A little something I made for my students during today’s actionscript class. Here’s the flash source code, and here’s an article that explains the technique I use to generate those groooovy colors. […]
Stoyen: True, but there is still a need to add the leading zero padding when producing hex digits for single digit numbers. A sprintf() function would make things much easier, since you can use “%02x” to specify a 2-digit hex number with zero-padding.