Return to randomlylabel.pm CVS log | Up to [LON-CAPA] / loncom / homework |
version 1.22, 2005/02/23 15:48:54 | version 1.23, 2005/02/23 15:51:48 |
---|---|
Line 237 sub get_image { | Line 237 sub get_image { |
sub get_color_from_hexstring { | sub get_color_from_hexstring { |
my ($image,$color)=@_; | my ($image,$color)=@_; |
if (!$color) { $color='000000'; } | if (!$color) { $color='000000'; } |
$color=~s/^[x\#]//; | |
my (undef,$red,undef,$green,undef,$blue)=split(/(..)/,$color); | my (undef,$red,undef,$green,undef,$blue)=split(/(..)/,$color); |
$red=hex($red);$green=hex($green);$blue=hex($blue); | $red=hex($red);$green=hex($green);$blue=hex($blue); |
my $imcolor; | my $imcolor; |