imagecolorclosesthwb

Get the index of the color which has the hue, white and blackness

&reftitle.description; `int` `imagecolorclosesthwb` `GdImage` `image` `int` `red` `int` `green` `int` `blue`

Get the index of the color which has the hue, white and blackness nearest the given color.

&reftitle.parameters;

&gd.image.description;

`red`

- &gd.value.red;

`green`

- &gd.value.green;

`blue`

- &gd.value.blue;

&reftitle.returnvalues;

Returns an integer with the index of the color which has the hue, white and blackness nearest the given color.

&reftitle.changelog;

&Version; | &Description;
&gd.changelog.image-param;

&reftitle.examples;

### Example of using `imagecolorclosesthwb`

    <?php
    $im = imagecreatefromgif('php.gif');

    echo 'HWB: ' . imagecolorclosesthwb($im, 116, 115, 152);

    imagedestroy($im);
    ?>

&example.outputs.similar;

    HWB: 33

&reftitle.seealso;

- `imagecolorclosest`