[jQuery] getting the (computed) background-color

[jQuery] getting the (computed) background-color


To retrieve the computed bgcolor of an element I had to do this:
var bgcolor = jQuery(this).css('backgroundColor');
if (bgcolor == 'transparent') {
    jQuery(this)
    .parents()
    .each(function(){
        var bg = jQuery(this).css('backgroundColor');
        if (bg != 'transparent'
        && bgcolor == 'transparent')
            bgcolor = bg;
    });
}
I hated it: is there not already a plugin doing this (and probably
doing it better)?
-- Fil