Convert RGB values to CMYK percentages
<p>I am getting RGB Values using this php code </p>

<pre><code>&lt;?php
$im = imagecreatefrompng("img/t4.png");
$rgb = imagecolorat($im, 15, 15);
$r = ($rgb &gt;&gt; 16) &amp; 0xFF;
$g = ($rgb &gt;&gt; 8) &amp; 0xFF;
$b = $rgb &amp; 0xFF;
?&gt;
</code></pre>

<p>And i need CMYK percentages also </p>

<p>Can someone please give me som guide lines.</p>

<p>Thanks.</p>
