trapd...@trapd00r.se writes: > And if you want to work with 256 colors (note that not all terminals support > this, and it should be avoided if it's not for your own use) you can do > something like this: > > > my @colors; > for(my $i=0;$i<256;$i++) { > push(@colors, "\033[38;5;$i".'m'); > } > print "$colors[100] This is olive green text \033[0m\n";
*** ,---- | Thank you all for good pointers and nifty code snippets. `---- *** Makes a sort of a nifty effect to add: for (@colors){ print "$_ This is some nifty color $_\n"; } I think modern Xterm supports all 256 but many of them look the same here, on gentoo linux with TERM=xterm (in X) (even if I change term from xterm to color-xterm) -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/