def _normalize_percent_rgb(value):
    """
    Internal normalization function for clipping percent values into
    the permitted range (0%-100%, inclusive).

    """
    percent = value.split(u'%')[0]
    percent = float(percent) if u'.' in percent else int(percent)

    return u'0%' if percent < 0 \
        else u'100%' if percent > 100 \
        else u'{}%'.format(percent)
def _normalize_percent_rgb ( value ) : percent = value . split ( u'%' ) [ 0 ] percent = float ( percent ) if u'.' in percent else int ( percent ) return u'0%' if percent < 0 else u'100%' if percent > 100 else u'{}%' . format ( percent )
Internal normalization function for clipping percent values into
    the permitted range (0%-100%, inclusive).