(PHP 4, PHP 5, PHP 7)
Allocate a color for an image
int imagecolorallocate ( resource $image, int $red, int $green, int $blue )
Returns a color identifier representing the color composed of the given RGB components.
imagecolorallocate() must be called to create each color that is to be used in the image represented by image.
Note:
The first call to imagecolorallocate() fills the background color in palette-based images