Esempio n. 1
0
def _complement(color, **kwargs):
    return hsl_op(OPRT['+'], color, 180.0, 0, 0)
Esempio n. 2
0
def _adjust_saturation(color, amount, **kwargs):
    return hsl_op(OPRT['+'], color, 0, amount, 0)
Esempio n. 3
0
def _lighten(color, amount, **kwargs):
    return hsl_op(OPRT['+'], color, 0, 0, amount)
Esempio n. 4
0
def _desaturate(color, amount, **kwargs):
    return hsl_op(OPRT['-'], color, 0, amount, 0)
Esempio n. 5
0
def _scale_lightness(color, amount, **kwargs):
    return hsl_op(OPRT['*'], color, 0, 0, amount)
Esempio n. 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
Esempio n. 7
0
def _desaturate(color, amount, root=None):
    return hsl_op(OPRT['-'], color, 0, amount, 0)
Esempio n. 8
0
def _adjust_lightness(color, amount, **kwargs):
    return hsl_op(OPRT['+'], color, 0, 0, amount)
Esempio n. 9
0
def _lighten(color, amount, root=None):
    return hsl_op(OPRT['+'], color, 0, 0, amount)
Esempio n. 10
0
def _darken(color, amount, root=None):
    return hsl_op(OPRT['-'], color, 0, 0, amount)
Esempio n. 11
0
def _adjust_hue(color, degrees, root=None):
    return hsl_op(OPRT['+'], color, degrees, 0, 0)
Esempio n. 12
0
def _scale_saturation(color, amount, root=None):
    return hsl_op(OPRT['*'], color, 0, amount, 0)
Esempio n. 13
0
def _scale_lightness(color, amount, root=None):
    return hsl_op(OPRT['*'], color, 0, 0, amount)
Esempio n. 14
0
def _scale_saturation(color, amount, **kwargs):
    return hsl_op(OPRT['*'], color, 0, amount, 0)
Esempio n. 15
0
def _grayscale(color, root=None):
    return hsl_op(OPRT['-'], color, 0, 1.0, 0)
Esempio n. 16
0
def _adjust_saturation(color, amount, root=None):
    return hsl_op(OPRT['+'], color, 0, amount, 0)
Esempio n. 17
0
def _complement(color, root=None):
    return hsl_op(OPRT['+'], color, 180.0, 0, 0)
Esempio n. 18
0
def _adjust_saturation(color, amount, **kwargs):
    return hsl_op(OPRT['+'], color, 0, amount, 0)
Esempio n. 19
0
def _saturate(color, amount, **kwargs):
    return hsl_op(OPRT["+"], color, 0, amount, 0)
Esempio n. 20
0
def _scale_saturation(color, amount, **kwargs):
    return hsl_op(OPRT['*'], color, 0, amount, 0)
Esempio n. 21
0
def _adjust_hue(color, degrees, **kwargs):
    return hsl_op(OPRT['+'], color, degrees, 0, 0)
Esempio n. 22
0
def _adjust_hue(color, degrees, **kwargs):
    return hsl_op(OPRT['+'], color, degrees, 0, 0)
Esempio n. 23
0
def _lighten(color, amount, **kwargs):
    return hsl_op(OPRT['+'], color, 0, 0, amount)
Esempio n. 24
0
def _darken(color, amount, **kwargs):
    return hsl_op(OPRT['-'], color, 0, 0, amount)
Esempio n. 25
0
def _darken(color, amount, **kwargs):
    return hsl_op(OPRT['-'], color, 0, 0, amount)
Esempio n. 26
0
def _grayscale(color, **kwargs):
    return hsl_op(OPRT['-'], color, 0, 100, 0)
Esempio n. 27
0
def _desaturate(color, amount, **kwargs):
    return hsl_op(OPRT['-'], color, 0, amount, 0)
Esempio n. 28
0
def _adjust_lightness(color, amount, **kwargs):
    return hsl_op(OPRT['+'], color, 0, 0, amount)
Esempio n. 29
0
def _grayscale(color, **kwargs):
    return hsl_op(OPRT['-'], color, 0, 100, 0)
Esempio n. 30
0
def _scale_lightness(color, amount, **kwargs):
    return hsl_op(OPRT['*'], color, 0, 0, amount)
Esempio n. 31
0
def _complement(color, **kwargs):
    return hsl_op(OPRT['+'], color, 180.0, 0, 0)
Esempio n. 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
Esempio n. 33
0
def _adjust_lightness(color, amount, root=None):
    return hsl_op(OPRT['+'], color, 0, 0, amount)