Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Imagick::getImageColormapColorImagick::getImageColorspace>
^ImagickLast updated: Mon, 26 Oct 2026

Imagick::getImageColors

(PECL imagick 2, PECL imagick 3)

Imagick::getImageColors — Gets the number of unique colors in the image

Description

public function Imagick::getImageColors(): int

Gets the number of unique colors in the image.

Parameters

This function has no parameters.

Return Values

Returns an int, the number of unique colors in the image.


<Imagick::getImageColormapColorImagick::getImageColorspace>
^ImagickLast updated: Mon, 26 Oct 2026