v4
UPDATED
Rewrote HSL chain and fixed problems with out of limit values
should be bulletproofed now and is faster than it was
thanks @NeonTL8 for notifying me of the problem.
Library "hsvColor"
HSV and HSL Gradient Tool Alternatives
rgbhsv(_col)
RGB Color to HSV Values
Parameters:
_col: Color input (#abc012 or color.name or color.rgb(0,0,0,0))
Returns: [h,s,v,a] values
rgbhsv(_r, _g, _b, _t)
RGB Color to HSV Values
Parameters:
_r: Red 0 - 255
_g: Green 0 - 255
_b: Blue 0 - 255
_t: Transp 0 - 100
Returns: [h,s,v,a] values
hsv(_h, _s, _v, _a)
HSV colors, Auto fix if past boundaries
Parameters:
_h: Hue Input (-360 - 360) or further
_s: Saturation 0.- 1.
_v: Value 0.- 1.
_a: Alpha 0.- 1.
Returns: Color output
hue(_col, _rotate)
returns 0-359 hue on color wheel
Parameters:
_col:
_rotate: Turn output by N degrees (+/-)
Returns: 360 degree hue value
rgbhsl(_col)
HSL vals from rgb col in
Parameters:
_col: The Color
Returns: HSLA tuple out
hsl(h, s, l)
HLS input to color output
Parameters:
h: hue
s: saturation
l: lightness
Returns: The RGB Color
relativeluminance(color)
Parameters:
color: (hex,rgb,color.___)
Returns: float
hsvInvert(_color)
Invert a color with hsv method (original experimental)
Parameters:
_color: color input
Returns: inverted color
hslInvert(_color)
Invert a color with hsl method (original experimental)
Parameters:
_color: color input
Returns: inverted color
hsv_gradient(signal, _startVal, _endVal, _startCol, _endCol)
Color Gradient Replacement Function for HSV calculated Gradents
Parameters:
signal: Control signal
_startVal: start color limit
_endVal: end color limit
_startCol: start color
_endCol: end color
Returns: HSV calculated gradient
hsl_gradient(signal, _startVal, _endVal, _startCol, _endCol)
Color Gradient Replacement Function for HSV calculated Gradents
Parameters:
signal: Control signal
_startVal: start color limit
_endVal: end color limit
_startCol: start color
_endCol: end color
Returns: HSV calculated gradient