![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Web-Safe Color Chartby trantor (Chaplain) |
on Oct 05, 2001 at 10:57 UTC ( #116927=note: print w/replies, xml ) | Need Help?? |
As far as I know, and as merlyn pointed out, a Web safe palette should consist of 6 * 6 * 6 = 216 colours only. Besides this, an obviuos improvement in the readability of your code could be using foreach instead of while loops, e.g.:
The usual way of representing this palette is either an 8 * 8 grid (using only the first 216 cells) or 6 tables, 6 * 6 each. The second approach is easier to program, the first more compact. Speaking about CGI.pm, since you don't process input parameters, can't generate errors, always use the same Content-type, there are no big security concerns that should force you to use CGI instead of rolling your own. Nonetheless it is a good exercise and a good starting point for studying the module, which should be customary for more complex CGIs. -- TMTOWTDI
In Section
Seekers of Perl Wisdom
|
|