Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

color::library::color(3pm) [debian man page]

Color::Library::Color(3pm)				User Contributed Perl Documentation				Color::Library::Color(3pm)

NAME
Color::Library::Color - Color entry for a Color::Library color dictionary METHODS
$id = $color->id Returns the id of the color A color id is in the format of <dictionary_id:color_name>, e.g. svg:aliceblue x11:bisque2 nbs-iscc-f:chromeyellow.66 vaccc:darkspringyellow $name = $color->name Returns the name of the color, e.g. aliceblue bisque2 chromeyellow darkspringyellow $title = $color->title Returns the title of the color, e.g. aliceblue bisque2 chrome yellow Dark Spring-Yellow $dictionary = $color->dictionary Returns the Color::Library::Dictionary object that the color belongs to $hex = $color->hex Returns the hex value of the color, e.g. ff08ff eed5b7 eaa221 669900 Note that $hex does NOT include the leading #, for that use $color->html, $color->css, or $color->svg $html = $color->html $css = $color->css $svg = $color->svg Returns the hex value of the color with a leading #, suitable for use in HTML, CSS, or SVG documents, e.g. #ff08ff #eed5b7 #eaa221 #669900 $value = $color->value Returns the numeric value of the color, e.g. 15792383 15652279 15376929 6723840 ($r, $g, $b) = $color->rgb Returns r, g, and b values of the color as a 3 element list (list context), e.g. (240, 248, 255) $rgb = $color->rgb Returns r, g, and b values of the color in a 3 element array (scalar context), e.g. [ 240, 248, 255 ] $color = Color::Library::Color->new( id => $id, name => $name, title => $title, value => $value ) $color = Color::Library::Color->new( { id => $id, name => $name, title => $title, value => $value } ) $color = Color::Library::Color->new( [[ $id, $name, $title, $rgb, $hex, $value ]] ) Returns a new Color::Library::Color object representing the specified color You probably don't want/need to call this yourself FUNCTIONS $hex = Color::Library::Color::rgb2hex( $rgb ) $hex = Color::Library::Color::rgb2hex( $r, $g, $b ) Converts an rgb value to its hex representation $value = Color::Library::Color::rgb2value( $rgb ) $value = Color::Library::Color::rgb2value( $r, $g, $b ) Converts an rgb value to its numeric representation $rgb = Color::Library::Color::value2rgb( $value ) ($r, $g, $b) = Color::Library::Color::value2rgb( $value ) Converts a numeric color value to its rgb representation ($r, $g, $b) = Color::Library::Color::parse_rgb_color( $hex ) ($r, $g, $b) = Color::Library::Color::parse_rgb_color( $value ) Makes a best effort to convert a hex or numeric color value to its rgb representation perl v5.14.2 2011-12-07 Color::Library::Color(3pm)

Check Out this Related Man Page

Imager::Color::Float(3pm)				User Contributed Perl Documentation				 Imager::Color::Float(3pm)

NAME
Imager::Color::Float - Rough floating point sample color handling SYNOPSIS
$color = Imager::Color->new($red, $green, $blue); $color = Imager::Color->new($red, $green, $blue, $alpha); $color = Imager::Color->new("#C0C0FF"); # html color specification $color->set($red, $green, $blue); $color->set($red, $green, $blue, $alpha); $color->set("#C0C0FF"); # html color specification ($red, $green, $blue, $alpha) = $color->rgba(); @hsv = $color->hsv(); # not implemented but proposed $color->info(); DESCRIPTION
This module handles creating color objects used by Imager. The idea is that in the future this module will be able to handle color space calculations as well. A floating point Imager color consists of up to four components, each in the range 0.0 to 1.0. Unfortunately the meaning of the components can change depending on the type of image you're dealing with: o for 3 or 4 channel images the color components are red, green, blue, alpha. o for 1 or 2 channel images the color components are gray, alpha, with the other two components ignored. An alpha value of zero is fully transparent, an alpha value of 1.0 is fully opaque. METHODS
new This creates a color object to pass to functions that need a color argument. set This changes an already defined color. Note that this does not affect any places where the color has been used previously. rgba() This returns the red, green, blue and alpha channels of the color the object contains. info Calling info merely dumps the relevant color to the log. AUTHOR
Arnar M. Hrafnkelsson, addi@umich.edu And a great deal of help from others - see the "README" for a complete list. SEE ALSO
Imager(3), Imager::Color. http://imager.perl.org/ perl v5.14.2 2011-06-06 Imager::Color::Float(3pm)
Man Page