(self, css, factor)
return css
Adjust brightness.
Adjust brightness.
Adjust brightness .
def brightness(self, css, factor):
        """Adjust brightness."""

        parts = [c.strip('; ') for c in css.split(':')]
        if len(parts) == 2 and parts[0] in ('background-color', 'color'):
            rgba = RGBA(parts[1])
            rgba.brightness(factor)
            parts[1] = "%s; " % rgba.get_rgb()
            return '%s: %s ' % (parts[0], parts[1])
        return css
def brightness ( self , css , factor ) : parts = [ c . strip ( '; ' ) for c in css . split ( ':' ) ] if len ( parts ) == 2 and parts [ 0 ] in ( 'background-color' , 'color' ) : rgba = RGBA ( parts [ 1 ] ) rgba . brightness ( factor ) parts [ 1 ] = "%s; " % rgba . get_rgb ( ) return '%s: %s ' % ( parts [ 0 ] , parts [ 1 ] ) return css