#!perl -w #blue has the least power for $g(0.7,0.85,1){ $hg=int($g*255+0.5); for $r(0,0.8,1){ $hr=int($r*255+0.5); for$b(0,0.7,1){ $hb=int($b*255+0.5); $c=sprintf("%02x%02x%02x",$hr,$hg,$hb); push @colors,$c; } } } #print "$_\n" for(@colors); #kill off 7 of the mid-blue colors, leaving 20 for(1..7){ for(;;){ $i=rand@colors; $col=$colors[$i]; $bb=substr $col,4,2; last if $bb ne '00' and $bb ne 'ff' and not$killed{$col}; } #print "$col\n"; $killed{$col}=1; } for(@colors){ next if $killed{$_}; #push @nn,$_; $nn{$_}=rand 1; } @colors=sort{$nn{$a} <=> $nn{$b}} keys%nn; #print "$_\n" for @colors; $_=<>; # before.02 chomp; @F=split; shift@F; die unless @F==@colors; for(0..$#F){ print "$F[$_] $colors[$_]\n"; }