http://www.perlmonks.org?node_id=1210411

g_speran has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks, I have the following code that I am testing on windows at the cmd prompt. I am trying to display bright colors, but when the bright color is called to print, it displays in white. So the first line displaysin green, but the 2nd line which I want to display in Bright Green, displays white. Any ideas on how to get it to be bright green?

#!/usr/bin/perl use if $^O eq 'MSWin32', Win32::Console::ANSI; use if $^O eq 'MSWin32', Term::ANSIColor => qw(:constants); if ($^O eq 'MSWin32') { $SUCCESS=GREEN; $BRIGHT_SUCCESS=BRIGHT_GREEN; $FAILURE=RED; $WARNING=YELLOW; $NORMAL=RESET; $cls='cls'; } else { $FAILURE=`echo -en "\\033[1;31m"`; $SUCCESS=`echo -en "\\033[1;32m"`; $WARNING=`echo -en "\\033[1;33m"`; $NORMAL=`echo -en "\\033[0;39m"`; $cls='clear'; } $RESULT="Test Line"; $line=sprintf("%s%s%s\n",$SUCCESS,$RESULT,$NORMAL); print $line; # <== This will print Green $line=sprintf("%s%s%s\n",$BRIGHT_SUCCESS,$RESULT,$NORMAL); print $line; # <== This will print White...not Bright Green