YouTip LogoYouTip

Php Imagecolorat

# PHP imagecolorat - Get the color index value of a pixel [![Image 3: PHP Image Processing](#)PHP Image Processing](#) imagecolorat β€” Get the color index value of a pixel. ### Syntax int imagecolorat ( resource $image , int $x , int $y ) Returns the color index value of the pixel at the specified location in the image specified by image. If PHP is compiled with GD library version 2.0 or higher and the image is a true color image, this function returns the RGB value of the specified point as an integer. Use bit shifting and masking to get the values of the red, green, and blue components. ### Example Get the individual RGB values. > 16) & 0xFF; $g = ($rgb >> 8) & 0xFF; $b = $rgb & 0xFF;?> ### Related Articles Sets the color for the specified palette index. Gets the colors for the specified index. [![Image 4: PHP Image Processing](#)PHP Image Processing](#)
← Highcharts 3D Column NullHighcharts 3D Charts β†’