← All docs
imagecolorsforindex()
Returns the red, green, blue, and alpha channels of a palette index.
imagecolorsforindex()
function imagecolorsforindex(mixed $image, int $color): array
Returns the red, green, blue, and alpha channels of a palette index.
Parameters:
$image(mixed)$color(int)
Returns: array
Availability
- Compiled (AOT): supported through the compiler-injected image prelude.
eval()(magician interpreter): not available inside eval’d code.
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how imagecolorsforindex is implemented in the compiler, see the internals page.