array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'function.imagecolorclosesthwb.php', 1 => 'imagecolorclosesthwb', 2 => 'Get the index of the color which has the hue, white and blackness', ), 'up' => array ( 0 => 'ref.image.php', 1 => 'Функції GD та Image', ), 'prev' => array ( 0 => 'function.imagecolorclosestalpha.php', 1 => 'imagecolorclosestalpha', ), 'next' => array ( 0 => 'function.imagecolordeallocate.php', 1 => 'imagecolordeallocate', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/image/functions/imagecolorclosesthwb.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 4 >= 4.0.1, PHP 5, PHP 7, PHP 8)
imagecolorclosesthwb — Get the index of the color which has the hue, white and blackness
Get the index of the color which has the hue, white and blackness nearest the given color.
imageОб'єкт GdImage, що повертається однією з функцій створення зображення, такою як imagecreatetruecolor().
redЗначення червоного компонента.
greenЗначення зеленого компонента.
blueЗначення синього компонента.
Returns an integer with the index of the color which has the hue, white and blackness nearest the given color.
| Версія | Опис |
|---|---|
| 8.0.0 |
Тепер image має бути примірником
GdImage. Раніше очікувався
gd-resource.
|
Приклад #1 Example of using imagecolorclosesthwb()
<?php
$im = imagecreatefromgif('php.gif');
echo 'HWB: ' . imagecolorclosesthwb($im, 116, 115, 152);
?>Поданий вище приклад виведе щось схоже на:
HWB: 33