Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: GD and colors

by waswas-fng (Curate)
on Jun 28, 2005 at 17:05 UTC ( [id://470719]=note: print w/replies, xml ) Need Help??


in reply to GD and colors

Few things, its not line 443 of GD.pm, its line 443 of Graph.PM. And from the GD::Graph POD...
=item dclrs (short for datacolours) This controls the colors for the bars, lines, markers, or pie slices. This should be a reference to an array of colour names as defined in L<GD::Graph::colour> (S<C<perldoc GD::Graph::colour>> for the names av +ailable). $graph->set( dclrs => [ qw(green pink blue cyan) ] );
This makes your color choices fail because later on in Graph you there is a line (at line # 443) that does a:
_rgb($self->{dclrs}[$_[0] % @{$self->{dclrs}} - 1]);
Update:

If you want to specifiy colors outside of the redefined list in GD::Graph::colours, you must use:
add_colour(colourname => [$r, $g, $b]) or add_colour('#7fe310') Self-explanatory. Exported with the :colours tag.


-Waswas

Replies are listed 'Best First'.
Re^2: GD and colors
by samizdat (Vicar) on Jun 28, 2005 at 17:12 UTC
    Note to self: R{more of}TFM! Thank you!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://470719]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2024-04-18 16:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found