VOOZH about

URL: https://www.geeksforgeeks.org/php/php-gmagickpixel-setcolor-function/

⇱ PHP | GmagickPixel setcolor() function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

PHP | GmagickPixel setcolor() function

Last Updated : 23 Jan, 2020
The GmagickPixel::setcolor() function is an inbuilt function in PHP which is used to set the color of the GmagickPixel object. Syntax:
GmagickPixel GmagickPixel::setcolor( string $color )
Parameters:This function accepts a single parameter $color which holds the color. Return Value: This function returns GmagickPixel object on success. Exceptions: This function throws GmagickPixelException on error. Below given programs illustrate the GmagickPixel::setcolor() function in PHP: Program 1: Output:
rgb(16962, 34181, 21588)
Program 2: Output: 👁 Image
Reference: https://www.php.net/manual/en/gmagickpixel.setcolor.php
Comment