'Return the background color by parsing both the background-color and
background shortcut properties. Note that inheritance/default values
are not used. None is returned if no background color is set.'

@property
def backgroundColor(self):

    def validate_color(col):
        return cssprofiles.validateWithProfile('color', col, profiles=[profiles.Profiles.CSS_LEVEL_2])[1]
    if (self._bgcolor is None):
        col = None
        val = self._style.get('background-color', None)
        if (val and validate_color(val)):
            col = val
        else:
            val = self._style.get('background', None)
            if (val is not None):
                try:
                    style = parseStyle(('background:    ' + val), validate=False)
                    val = style.getProperty('background').cssValue
                    try:
                        val = list(val)
                    except:
                        val = [val]
                    for c in val:
                        c = c.cssText
                        if validate_color(c):
                            col = c
                            break
                except:
                    pass
        if (col is None):
            self._bgcolor = False
        else:
            self._bgcolor = col
    return (self._bgcolor if self._bgcolor else None)
