21 Nov 2016 12:24:54 UTC
- Distribution: GDGraph
- Module version: 1.10
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (45)
- Testers (1786 / 135 / 0)
- KwaliteeBus factor: 0
- 63.30% Coverage
- License: perl_5
- Download (153.47KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:5 non-PAUSE users
- Martien Verbruggen
- Benjamin Warfield
- PREDEFINED COLOUR NAMES
- SEE ALSO
GD::Graph::colour - Colour manipulation routines for use with GD::Graph
use GD::Graph::colour qw(:colours :lists :files :convert);
The GD::Graph::colour 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.
Returns a list of number of colours colour names known to the package. Exported with the :lists tag.
Returns a list of number of colours colour names known to the package, sorted by luminance or hue. NB. 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.
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.
Returns the hue of the colour with the specified RGB values. Exported with the :colours tag.
Returns the luminance of the colour with the specified RGB values. Exported with the :colours tag.
Self-explanatory. Exported with the :colours tag.
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.
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.
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.
Martien Verbruggen <email@example.com>
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.
|s||Focus search bar|
|?||Bring up this help dialog|
|g p||Go to pull requests|
|g i||go to github issues (only if github is preferred repository)|
|g a||Go to author|
|g c||Go to changes|
|g i||Go to issues|
|g d||Go to dist|
|g r||Go to repository/SCM|
|g s||Go to source|
|g b||Go to file browse|