I want to find out if the DOM element has a style, for example color: red. If defined in an inline style like
<input type="text" style="color:Red">
I can easily get it using JavaScript
But what about whether this is defined in the role - I mean as the css class and assign the DOM Element class
With javascript, I know that I can get the color using some call to the computedStyle method and give it the name of the property, but it brings me color in RGB number mode in Firefox, and in IE it gets the color name
My question here is how to convert RGB to a simple color name?
Marwan
source share