php8.5
Home/ Manual/ image / functions/ imagecolordeallocate

imagecolordeallocate

PHP function Edit on GitHub ✎

(PHP 4, PHP 5, PHP 7, PHP 8)

De-allocate a color for an image

Description

imagecolordeallocate(GdImage $image, int $color): true

De-allocates a color previously allocated with imagecolorallocate() or imagecolorallocatealpha().

Parameters

color

The color identifier.

Return Values

Always

Changelog

VersionDescription

Examples

Using imagecolordeallocate()

php
<?php
$white = imagecolorallocate($im, 255, 255, 255);
imagecolordeallocate($im, $white);
?>

See Also

Source: reference/image/functions/imagecolordeallocate.xml · from the official PHP manual (php/doc-en)