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!!!