Color::Rgb - Simple rgb.txt parsing class


Color-Rgb documentation  | view source Contained in the Color-Rgb distribution.

Index


NAME

Top

Color::Rgb - Simple rgb.txt parsing class

REVISION

Top

$Revision: 1.4 $

SYNOPSIS

Top

    use Color::Rgb;
    $rgb = new Color::Rgb(rgb_txt=>'/usr/X11R6/lib/X11/rgb.txt');

    @rgb = $rgb->rgb('red');            # returns 255, 0, 0
    $red = $rgb->rgb('red', ',');       # returns the above rgb list as
                                        # comma separated string
    $red_hex=$rgb->hex('red');          # returns 'FF0000'
    $red_hex=$rgb->hex('red', '#');     # returns '#FF0000'

    $my_hex = $rgb->rgb2hex(255,0,0);   # returns 'FF0000'
    $my_rgb = $rgb->hex2rgb('#FF0000'); # returns list of 255,0,0

DESCRIPTION

Top

Color::Rgb - simple rgb.txt parsing class.

METHODS

Top

CREDITS

Top



Following people contributed to this library with their patches and/or bug reports. (list is in chronological order)
    • Marc-Olivier BERNARD <mob@kilargo.fr> notified of the warnings that the library produced while "warnings" pragma enabled and improper parsed rgb values that contain single "0". This bug was fixed in 1.2
    • Martin Herrmann <Martin-Herrmann@gmx.de> noticed a bug in rgb2hex() method which was failing if the blue value was a single "0". This problem is fixed in 1.3
  • COPYRIGHT

    Top

    AUTHOR

    Top



    Color::Rgb is maintained by Sherzod B. Ruzmetov <sherzodr@cpan.org>.

    SEE ALSO

    Top



    Color::Object

    Color-Rgb documentation  | view source Contained in the Color-Rgb distribution.