Conver...::XTerm(3pm)
π Convert::Color::XTerm(3pm) β User Contributed Perl Documentation β¨
okay bestie, so this is the manual page for Convert::Color::XTerm, and it's giving "I know every single default color xterm ever ships with" energy. it's part of the User Contributed Perl Documentation, and yes, we're reading a manpage together like it's a group chat. iconic. let's go π«Ά
π NAME π
Convert::Color::XTerm β the indexed colors used by XTerm. literally just the color numbers, no vibes-based guesswork. π
π SYNOPSIS π
you can use it directly, like this:
use Convert::Color::XTerm;
my $red = Convert::Color::XTerm->new( 1 );
or you can slide in via Convert::Color:
use Convert::Color;
my $cyan = Convert::Color->new( 'xterm:14' );
both paths, both slay. β¨
π DESCRIPTION π
so this class is a subclass of Convert::Color::RGB8, and what it does is look up the colors that xterm uses by default. πΈ
heads up bestie: this module is not smart enough to actually parse the XTerm config on your machine, and it does not query a running terminal for its real, actual colors. it just implements the colors that show up as the defaults in the XTerm source code. no cap. π
what it does do is implement the complete 256-color model in XTerm. that range breaks down like this:
- 0-7: the basic VGA colors, dark intensity. and
7is a "dark" white β meaning, a light grey. π - 8-15: the basic VGA colors, light intensity. and
8represents a "light" black β meaning, a dark grey. π - 16-231: a
6x6x6RGB color cube.- Since version 0.06: this can also be specified as
"rgb(R,G,B)"where each of R, G and B can be0to5, or"0%"to"100%".
- Since version 0.06: this can also be specified as
- 232-255: a 24-step greyscale ramp.
- Since version 0.06: this can also be specified as
"grey(GREY)", where GREY is0to23, or"0%"to"100%".
- Since version 0.06: this can also be specified as
256 colors, fully accounted for, periodt. π
π¦ CONSTRUCTOR π¦
β¨ new β¨
$color = Convert::Color::XTerm->new( $index )
hands you back a shiny new object representing the color sitting at that index. main character object energy. π
πΈ METHODS πΈ
π index π
$index = $color->index
the index of the XTerm color. that's it, that's the method, and it ate. π
π SEE ALSO π
Convert::Colorβ color space conversions. your go-to bestie for moving between color spaces. π₯
π«Ά AUTHOR π«Ά
Paul Evans <leonerd@leonerd.org.uk> β thank you for your service, king. π
and that's the whole page, bestie!! this one shipped with perl v5.32.1, dated 2021-08-23, and it's the Conver...::XTerm(3pm) page in the User Contributed Perl Documentation. read it, love it, go color something. mwah πβ¨π
π¦ where this page comes from
- debian bookworm: libconvert-color-xterm-perl 0.06-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libconvert-color-xterm-perl 0.06-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libconvert-color-xterm-perl 0.06-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libconvert-color-xterm-perl 0.06-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libconvert-color-xterm-perl 0.06-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libconvert-color-xterm-perl 0.06-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms