GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  GD::GRAPH::COLOUR (3)

.ds Aq ’

NAME

GD::Graph::colour - Colour manipulation routines for use with GD::Graph

CONTENTS

SYNOPSIS

use GD::Graph::colour qw(:colours :lists :files :convert);

DESCRIPTION

The <B>GD::Graph::colourB> package provides a few routines to work with colours. The functionality of this package is mainly defined by what is needed, now and historically, by the GD::Graph modules.

FUNCTIONS

colour_list( number of colours )

Returns a list of number of colours colour names known to the package. Exported with the :lists tag.

sorted_colour_list( number of colours )

Returns a list of number of colours colour names known to the package, sorted by luminance or hue. <B>NB.B> Right now it always sorts by luminance. Will add an option in a later stage to decide sorting method at run time. Exported with the :lists tag.

_rgb( colour name )

Returns a list of the RGB values of colour name. if the colour name is a string of the form that is acceptable to the hex2rgb sub, then the colour will be added to the list dynamically. Exported with the :colours tag.

_hue( R,G,B )

Returns the hue of the colour with the specified RGB values. Exported with the :colours tag.

_luminance( R,G,B )

Returns the luminance of the colour with the specified RGB values. Exported with the :colours tag.

add_colour(colourname => [$r, CW$g, CW$b]) or add_colour(’#7fe310’)

Self-explanatory. Exported with the :colours tag.

rgb2hex($red, CW$green, CW$blue)

    hex2rgb(’#7fe310’)

These functions translate a list of RGB values into a hexadecimal string, as is commonly used in HTML and the Image::Magick API, and vice versa. Exported with the :convert tag.

read_rgb( file name )

Reads in colours from a rgb file as used by the X11 system.

Doing something like:



    use GD::Graph::bars;
    use GD::Graph::colour;

    GD::Graph::colour::read_rgb("rgb.txt") or die "cannot read colours";



Will allow you to use any colours defined in rgb.txt in your graph. Exported with the :files tag.

PREDEFINED COLOUR NAMES

white, lgray, gray, dgray, black, lblue, blue, dblue, gold, lyellow, yellow, dyellow, lgreen, green, dgreen, lred, red, dred, lpurple, purple, dpurple, lorange, orange, pink, dpink, marine, cyan, lbrown, dbrown.

AUTHOR

Martien Verbruggen <mgjv@tradingpost.com.au>

    Copyright

GIFgraph: Copyright (c) 1995-1999 Martien Verbruggen. Chart::PNGgraph: Copyright (c) 1999 Steve Bonds. GD::Graph: Copyright (c) 1999 Martien Verbruggen.

All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

GD::Graph, GD::Graph::FAQ
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 GRAPH::COLOUR (3) 2013-06-22

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.