O'Reilly logo

Programming Web Graphics with Perl and GNU Softwar by Shawn Wallace

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Colors in GIFgraph

All GIFgraph color routines taking colorname as a parameter expect a string with the name of a valid color. GIFgraph comes bundled with the GIFgraph::colour[15] package that provides some methods for organizing and manipulating colorname strings. GIFgraph has 29 predefined colorname strings (see Table 6.2); you can define additional strings in an external file by using the read_rgb( )method.

Table 6-2. Predefined GIFgraph Color Names and Numerical Representations

Color Name String

Red

Green

Blue

Hex Representation

white

255

255

255

#FFFFFF

lyellow

255

255

0

#FFFF00

gold

255

215

0

#FFD700

cyan

0

255

255

#00FFFF

pink

255

183

193

#FFB7C1

lgray

191

191

191

#BFBFBF

lorange

255

183

0

#FFB700

lbrown

210

180

140

#D2B48C

lgreen

0

255

0

#00FF00

yellow

191

191

0

#BFBF00

orange

255

127

0

#FF7F00

dpink

255

105

180

#FF69B4

green

0

191

0

#00BF00

marine

127

127

255

#7F7FFF

gray

127

127

127

#7F7F7F

dyellow

127

127

0

#7F7F00

dgreen

0

127

0

#007F00

lpurple

255

0

255

#FF00FF

dbrown

165

42

42

#A52A2A

dgray

63

63

63

#3F3F3F

purple

191

0

191

#BF00BF

lred

255

0

0

#FF0000

red

191

0

0

#BF0000

dpurple

127

0

127

#7F007F

dred

127

0

0

#7F0000

lblue

0

0

255

#0000FF

blue

0

0

191

#0000BF

dblue

0

0

127

#00007F

black

0

0

0

#000000

Calling the usemethod with the :colourstags will import the _rgb( ), _hue( ), and _luminance() functions. The :lists ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required