Name

hue — return hue of a color

Synopsis

GIFgraph::colour::_hue(R, G, B)

This method will return the hue of a color represented by the given RGB list. The hue is represented as a floating point number in the range to 1, where is black and 1 is white. For example:

use GIFgraph::colour qw(:colours);
print _hue(51, 51, 51);                   # This is actually 20% grey

will give us a value of .2 for output.

Get Programming Web Graphics with Perl and GNU Softwar now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.