php8.5
Home/ Manual/ gmagick / gmagickpixel/ GmagickPixel::getcolor

GmagickPixel::getcolor

PHP function Edit on GitHub ✎

(PECL gmagick >= Unknown)

Returns the color

Description

GmagickPixel::getcolor(bool $as_array = false, bool $normalize_array = false): mixed

Returns the color described by the GmagickPixel object, as a string or an array. If the color has an opacity channel set, this is provided as a fourth value in the list.

Parameters

as_array

true to indicate return of array instead of string.

normalize_array

true to normalize the color values.

Return Values

A string or an array of channel values, each normalized if true is given as normalize_array. Throws GmagickPixelException on error.

Source: reference/gmagick/gmagickpixel/getcolor.xml · from the official PHP manual (php/doc-en)