Convert RGB to ColorName String Javascript
<p>I want to find out if a DOM Element has a style which is for example a color:Red.
If this is defined on the inline style just like </p>

<pre><code>&lt;input type="text" style="color:Red"&gt;
</code></pre>

<p>I can get it easily with JavaScript </p>

<p>But how about if it's defined on a role -  I mean as a css class and assign the class to the DOM Element </p>

<p>With javascript I know I can get the color with some method call computedStyle and give it the name of the property but it brings me the color in RGB numbers mode in Firefox and in IE it gets the color name </p>

<p>my question here is how to convert RGB into a simple color name?</p>
