Is there a way to accurately determine the visible color of page elements? When using JQuery, I can retrieve the background-color of an element with the following code:
$('#foo').css('background-color');
However, the background-color of #foo
may be returned as "transparent" even if one of its parent elements has a colored background. How can I get the correct visible color that end users see, including semi-transparency and RGBA values?
Update
I am currently utilizing the Selenium2 Java API with Firefox 5. Is there a method to achieve this without relying on JQuery? Perhaps involving screenshots?
Update 2
I have revised and expanded my query in this question: Get dominating color of a specific area in an image: Color Query for Web Page Elements