in reply to Re^2: Perl color identify ?
in thread Perl color identify ?
Next, in the CGI script, you could code the following:<a href="color.cgi?source_color=red">Red link</a>
Now, for each of the 'source' colors relative to the link, you will be able to translate it to the destination HTML color code. Then, using the HEX representation of the color within the $destination variable, you will be able to use it where every you like throughout your code.#!/usr/bin/perl use strict; use warnings; use CGI; my $source = CGI::param( 'source_color' ); my $color_map = { 'red' => 'CCFF33', }; my $destination = '#' . ( $color_map->{$source} || 'CCFF33' );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Perl color identify ?
by sunny (Initiate) on Nov 29, 2005 at 05:06 UTC | |
by parv (Parson) on Nov 29, 2005 at 05:23 UTC |