Adding colors
Unless a canvas is created based on an already existing image, creating an image with imagecreate() will
not have any colors in its palette
Ways to add colors
Adding colors can be done in a number of different ways using the following function family:
- • imagecolorallocate() - Allocate a new color in the palette
- • imagecolorexact() - Attempt to find the specified color in an existing palette
- • imagecolorclosest() - Provide the closest match to the specified color