I’m using this and it doesn’t return anything to me
function returnColorValue(that) {
//that equal to a jq object
if (that.css("color") == '#ffffff' || that.css("color") == '#fff' || that.css("color") == 'white' || that.css("color") == 'rgb(255, 255, 255)' || that.css("color") == 'rgba(255, 255, 255)') {
console.log(that.css("color"));
}
}
and stranger than that- each browser will use a different method.
In chrome and ff i found nothing.
I used also rgba and it didn’t help me at all…
I cannot compare to any classes (like was suggested here) cause the value of this classes changes between contexts of different pages.
Thanks for all the helpers.
Shlomi.
The CSS property for background color is, quite literally,
background-color. Thecolorproperty refers to the foreground, or text, color.