Code
Result

PHP code example: imagecolorallocate

Allocate a color for an image. See documentation.

You can try this function yourself. Just edit the code and on "Run" to see the result.