NAME
Term::ExtendedColor::Xresources - Query and set various Xresources
SYNOPSIS
use Term::ExtendedColor::Xresources;
# Get RGB values for all defined colors
my $colors = get_xterm_colors( [0 .. 255] );
DESCRIPTION
Term::ExtendedColor::Xresources provides functions for changing and querying the underlying terminal for various X resources.
EXPORTS
set_xterm_color()
Parameters: $index, $color
Returns: $string
# Change color index 220 from ffff00 to ff0000
my $color = set_xterm_color(220, 'ff0000');
print $color;
get_xterm_colors()
Parameters: $index | \@indexes
Returns: \%colors
my $defined_colors = get_xterm_colors( [ 0 .. 16 ] );
print $defined_colors->{4}->{red}, "\n";
print $defined_colors->{8}->{rgb}, "\n";
Returns a hash reference containing RGB values of the defined colors. If omitting any parameters, defaults to all colors, 0 .. 255.
10 => {
red => "b0",
green => "3b",
blue => "31",
rgb => "b03b31",
},
11 => {
red => "bd",
green => "f1",
blue => "3d",
rgb => "bdf13d",
},
SEE ALSO
Term::ExtendedColor
AUTHOR
Magnus Woldrich
CPAN ID: WOLDRICH
magnus@trapd00r.se
http://japh.se
Written by Magnus Woldrich
COPYRIGHT
Copyright 2010 Magnus Woldrich <magnus@trapd00r.se>. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.