Example #1
0
def _complement(color, **kwargs):
    return hsl_op(OPRT['+'], color, 180.0, 0, 0)
Example #2
0
def _adjust_saturation(color, amount, **kwargs):
    return hsl_op(OPRT['+'], color, 0, amount, 0)
Example #3
0
def _lighten(color, amount, **kwargs):
    return hsl_op(OPRT['+'], color, 0, 0, amount)
Example #4
0
def _desaturate(color, amount, **kwargs):
    return hsl_op(OPRT['-'], color, 0, amount, 0)
Example #5
0
def _scale_lightness(color, amount, **kwargs):
    return hsl_op(OPRT['*'], color, 0, 0, amount)
Example #6
0
def __asc_color(op, color, saturation, lightness, red, green, blue, alpha):
    if lightness or saturation:
        color = hsl_op(op, color, 0, saturation, lightness)
    if red or green or blue or alpha:
        color = rgba_op(op, color, red, green, blue, alpha)
    return color
Example #7
0
def _desaturate(color, amount, root=None):
    return hsl_op(OPRT['-'], color, 0, amount, 0)
Example #8
0
def _adjust_lightness(color, amount, **kwargs):
    return hsl_op(OPRT['+'], color, 0, 0, amount)
Example #9
0
def _lighten(color, amount, root=None):
    return hsl_op(OPRT['+'], color, 0, 0, amount)
Example #10
0
def _darken(color, amount, root=None):
    return hsl_op(OPRT['-'], color, 0, 0, amount)
Example #11
0
def _adjust_hue(color, degrees, root=None):
    return hsl_op(OPRT['+'], color, degrees, 0, 0)
Example #12
0
def _scale_saturation(color, amount, root=None):
    return hsl_op(OPRT['*'], color, 0, amount, 0)
Example #13
0
def _scale_lightness(color, amount, root=None):
    return hsl_op(OPRT['*'], color, 0, 0, amount)
Example #14
0
def _scale_saturation(color, amount, **kwargs):
    return hsl_op(OPRT['*'], color, 0, amount, 0)
Example #15
0
def _grayscale(color, root=None):
    return hsl_op(OPRT['-'], color, 0, 1.0, 0)
Example #16
0
def _adjust_saturation(color, amount, root=None):
    return hsl_op(OPRT['+'], color, 0, amount, 0)
Example #17
0
def _complement(color, root=None):
    return hsl_op(OPRT['+'], color, 180.0, 0, 0)
Example #18
0
def _adjust_saturation(color, amount, **kwargs):
    return hsl_op(OPRT['+'], color, 0, amount, 0)
Example #19
0
def _saturate(color, amount, **kwargs):
    return hsl_op(OPRT["+"], color, 0, amount, 0)
Example #20
0
def _scale_saturation(color, amount, **kwargs):
    return hsl_op(OPRT['*'], color, 0, amount, 0)
Example #21
0
def _adjust_hue(color, degrees, **kwargs):
    return hsl_op(OPRT['+'], color, degrees, 0, 0)
Example #22
0
def _adjust_hue(color, degrees, **kwargs):
    return hsl_op(OPRT['+'], color, degrees, 0, 0)
Example #23
0
def _lighten(color, amount, **kwargs):
    return hsl_op(OPRT['+'], color, 0, 0, amount)
Example #24
0
def _darken(color, amount, **kwargs):
    return hsl_op(OPRT['-'], color, 0, 0, amount)
Example #25
0
def _darken(color, amount, **kwargs):
    return hsl_op(OPRT['-'], color, 0, 0, amount)
Example #26
0
def _grayscale(color, **kwargs):
    return hsl_op(OPRT['-'], color, 0, 100, 0)
Example #27
0
def _desaturate(color, amount, **kwargs):
    return hsl_op(OPRT['-'], color, 0, amount, 0)
Example #28
0
def _adjust_lightness(color, amount, **kwargs):
    return hsl_op(OPRT['+'], color, 0, 0, amount)
Example #29
0
def _grayscale(color, **kwargs):
    return hsl_op(OPRT['-'], color, 0, 100, 0)
Example #30
0
def _scale_lightness(color, amount, **kwargs):
    return hsl_op(OPRT['*'], color, 0, 0, amount)
Example #31
0
def _complement(color, **kwargs):
    return hsl_op(OPRT['+'], color, 180.0, 0, 0)
Example #32
0
def __asc_color(op, color, saturation, lightness, red, green, blue, alpha):
    if lightness or saturation:
        color = hsl_op(op, color, 0, saturation, lightness)
    if red or green or blue or alpha:
        color = rgba_op(op, color, red, green, blue, alpha)
    return color
Example #33
0
def _adjust_lightness(color, amount, root=None):
    return hsl_op(OPRT['+'], color, 0, 0, amount)