<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.image.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  '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 and Image Funzioni',
  ),
  '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);

?>
<div id="function.imagecolorclosesthwb" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imagecolorclosesthwb</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.1, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">imagecolorclosesthwb</span> &mdash; <span class="dc-title">Get the index of the color which has the hue, white and blackness</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.imagecolorclosesthwb-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>imagecolorclosesthwb</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="class.gdimage.php" class="type GdImage">GdImage</a></span> <code class="parameter">$image</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$red</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$green</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$blue</code></span><br>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

  <p class="para rdfs-comment">
   Get the index of the color which has the hue, 
   white and blackness nearest the given color.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.imagecolorclosesthwb-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    <dt><code class="parameter">
image</code></dt><dd><p class="para">Una risorsa immagine, restituita da una delle funzioni di creazione immagine, 
come <span class="function"><a href="function.imagecreatetruecolor.php" class="function">imagecreatetruecolor()</a></span>.</p></dd>
    
     <dt><code class="parameter">red</code></dt>
     <dd>
      <p class="para">Valore della componente rossa.</p>
     </dd>
    
    
     <dt><code class="parameter">green</code></dt>
     <dd>
      <p class="para">Valore della componente verde.</p>
     </dd>
    
    
     <dt><code class="parameter">blue</code></dt>
     <dd>
      <p class="para">Valore della componente blu.</p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.imagecolorclosesthwb-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Returns an integer with the index of the color which has 
   the hue, white and blackness nearest the given color.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.imagecolorclosesthwb-changelog">
  <h3 class="title">Log delle modifiche</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Versione</th>
      <th>Descrizione</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.0.0</td>
 <td>
  <code class="parameter">image</code> expects a <span class="classname"><a href="class.gdimage.php" class="classname">GdImage</a></span>
  instance now; previously, a valid <code class="literal">gd</code> <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> was expected.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.imagecolorclosesthwb-examples">
  <h3 class="title">Esempi</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 Example of using <span class="function"><strong>imagecolorclosesthwb()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$im </span><span style="color: #007700">= </span><span style="color: #0000BB">imagecreatefromgif</span><span style="color: #007700">(</span><span style="color: #DD0000">'php.gif'</span><span style="color: #007700">);<br /><br />echo </span><span style="color: #DD0000">'HWB: ' </span><span style="color: #007700">. </span><span style="color: #0000BB">imagecolorclosesthwb</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #0000BB">116</span><span style="color: #007700">, </span><span style="color: #0000BB">115</span><span style="color: #007700">, </span><span style="color: #0000BB">152</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Il precedente esempio visualizzerà
qualcosa simile a:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">HWB: 33</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.imagecolorclosesthwb-seealso">
   <h3 class="title">Vedere anche:</h3>
   <ul class="simplelist">
    <li><span class="function"><a href="function.imagecolorclosest.php" class="function" rel="rdfs-seeAlso">imagecolorclosest()</a> - Get the index of the closest color to the specified color</span></li>
   </ul>
  </div>

</div><?php manual_footer($setup); ?>