Is there a way to detect if a rendered DOM element has the same color as its background, effectively being invi开发者_StackOverflow社区sible invisible elements (that is: elements invisible not because of display style property, but based on color only), possibly through a framework/tool that works at least on one browser? Ideally, it would be able to detect very similar colors as well. Background images would be great to be considered, but then this might be a little too far.
I've used this in the past - very helpful. Basically it checks the contrast between foreground and background to see if the site is accessible. It will definitely flag up elements that are, as you say, invisible
http://juicystudio.com/article/colour-contrast-analyser-firefox-extension.php
精彩评论