PHP imagecolorsforindex - Get the Color of a Certain Index
imagecolorsforindex — Gets the color of a certain index.
Syntax
array imagecolorsforindex ( resource $image , int $index )
This function returns an associative array with the keys red, green, blue, and alpha, containing the corresponding values of the specified color index.
Example
The output of the example above is similar to:
Array
(
[red] => 195
[green] => 223
[blue] => 165
[alpha] => 64
)
Related Articles
- imagecolorat() Get the color index value of a certain pixel.
- imagecolorexact() Get the index value of the specified color.
PHP Image Processing