in reply to Re: Term::Visual colors
in thread Term::Visual colors

I've looked through the module to try to find the way it sets colors, but it seems to use Curses's abstraction layer. Which, from perldoc Curses, I gather doesn't support a "normal" color. Printing "\033[0m" doesn't help, either. It just appears as a literal =[

Replies are listed 'Best First'.
Re^3: Term::Visual colors
by nornagon (Acolyte) on Jan 03, 2005 at 09:19 UTC
    Okay, I hacked up Term::Visual a bit and came up with a patch one can apply to Term/Visual.pm:
    @@ -148,6 +148,7 @@ $kernel->alias_set( $alias ); $console = POE::Wheel::Curses->new( InputEvent => 'private_input'); + use_default_colors(); my $old_mouse_events = 0; mousemask(0, $old_mouse_events); @@ -1354,6 +1355,7 @@ re => COLOR_RED, red => COLOR_RED, wh => COLOR_WHITE, white => COLOR_WHITE, ye => COLOR_YELLOW, yellow => COLOR_YELLOW, + de => -1, default => -1, ); my %attribute_table =
    Works a charm now ^_^ you just have to set colors as 'de' or 'default'.