imagecolorat

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Get the index of the color of a pixel
<?php imagecolorat(GdImage $image, int $x, int $y): int|false
<?php         $format = $this->argument(2)->type('string')->value('array');




        $color = imagecolorat($image->getCore(), $x, $y);



        if ( ! imageistruecolor($image->getCore())) {

            $color = imagecolorsforindex($image->getCore(), $color);