in reply to hex color generator

Converting RGB to HEX is easy, you can use something like this:
my ($red,$green,$blue) = (100,100,100); #or whatever $hex = sprintf("%x%x%x",$red,$green,$blue);
Then $hex would be assigned to the hex value of the desired RGB color ($red, $green, $blue).
The UI is up to you.

"What once was, was, and won't be again."

Replies are listed 'Best First'.
Re: RE: hex color generator
by extremely (Priest) on Apr 06, 2001 at 20:09 UTC
    You want that sprintf string to be "%02x%02x%02x" so that zeropadding is turned on and set to 2 chars width. otherwise (255,128,9) gets you 'ff809' which may not be too useful where a 6 char value is required. =)

    --
    $you = new YOU;
    honk() if $you->love(perl)