Convert::Color::XTerm(3pm) | User Contributed Perl Documentation | Convert::Color::XTerm(3pm) |
"Convert::Color::XTerm" - indexed colors used by XTerm
Directly:
use Convert::Color::XTerm; my $red = Convert::Color::XTerm->new( 1 );
Via Convert::Color:
use Convert::Color; my $cyan = Convert::Color->new( 'xterm:14' );
This subclass of Convert::Color::RGB8 provides lookup of the colors that xterm uses by default. Note that the module is not intelligent enough to actually parse the XTerm configuration on a machine, nor to query a running terminal for its actual colors. It simply implements the colors that are present as defaults in the XTerm source code.
It implements the complete 256-color model in XTerm. This range consists of:
Since version 0.06: This can also be specified as "rgb(R,G,B)" where each of R, G and B can be 0 to 5, or "0%" to "100%".
Since version 0.06: This can also be specified as "grey(GREY)", where GREY is 0 to 23, or "0%" to "100%".
$color = Convert::Color::XTerm->new( $index )
Returns a new object to represent the color at that index.
$index = $color->index
The index of the XTerm color.
Paul Evans <leonerd@leonerd.org.uk>
2021-08-23 | perl v5.32.1 |