Created
February 2, 2010 22:27
-
-
Save treed/293111 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Digest::MD5 qw(md5_hex); | |
my $text = $ARGV[0]; | |
my @colors = (21,23..51,63..87,99..231,246..253); | |
my $colors = @colors; | |
my $color = $colors[int(md5_hex($text)) % $colors]; | |
print "[38;5;" . $color . "m$text\n" . "[0m"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment