#!/usr/bin/perl use strict; my @colorinfo=; my $i = rand @colorinfo; my $line=$colorinfo[$i]; $line=~/(\d+)\s+(\d+)\s+(\d+)\s+(.*)$/; my $brightness=($1*299+$2*587+$3*114)/1000; my $fg=$brightness>135?"black":"white"; exec("xterm -fg $fg -bg \'$4\' -font 6x13 -ls -sb -sl 1000 &"); __DATA__ 199 21 133 medium violet red 176 196 222 light steel blue 102 139 139 paleturquoise4 159 121 238 mediumpurple2 141 182 205 lightskyblue3 0 238 118 springgreen2 255 160 122 light salmon 154 205 50 yellowgreen 178 58 238 darkorchid2 69 139 116 aquamarine4 71 60 139 slateblue4 131 111 255 slateblue1 192 255 62 olivedrab1 139 105 20 goldenrod4 205 155 29 goldenrod3 142 229 238 cadetblue2