logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

"Convert::Color::X11" - named lookup of colors from X11's rgb.txt

Author

       Paul Evans <leonerd@leonerd.org.uk>

perl v5.40.0                                       2024-09-16                           Convert::Color::X11(3pm)

Class Methods

colors
          @colors = Convert::Color::X11->colors;

       Returns a list of the defined color names, in the order they were found in the rgb.txt file.

          $num_colors = Convert::Color::X11->colors;

       When called in scalar context, this method returns the count of the number of defined colors.

Constructor

new
          $color = Convert::Color::X11->new( $name );

       Returns a new object to represent the named color.

Description

       This subclass of Convert::Color::RGB8 provides lookup of color names provided by X11's rgb.txt file.

Methods

name
          $name = $color->name;

       The name of the VGA color.

Name

       "Convert::Color::X11" - named lookup of colors from X11's rgb.txt

See Also

       •   Convert::Color - color space conversions

Synopsis

       Directly:

          use Convert::Color::X11;

          my $red = Convert::Color::X11->new( 'red' );

       Via Convert::Color:

          use Convert::Color;

          my $cyan = Convert::Color->new( 'x11:cyan' );

See Also