This function is guaranteed to return a color index for a requested color, either the exact color or the closest possible alternative.
A GdImage object, returned by one of the image creation functions, such as imagecreatetruecolor.
Value of red component.
Value of green component.
Value of blue component.
A value between 0 and 127. 0 indicates completely opaque while 127 indicates completely transparent.
Returns a color index.
|8.0.0||image expects a GdImage instance now; previously, a resource was expected.|