HSV and HSL gradient Tools ( Built-in Drop-in replacement )Library "hsvColor"
HSV and HSL Gradient Tool Alternatives and helpers. Demo'd is built-in in the middle with HSL/HSV gradients on top/bottom
TODO: Solve for #000000 issue
rgbhsv(_col)
RGB Color to HSV Values
Parameters:
_col : Color input (#abc012 or color.name or color.rgb(0,0,0,0))
Returns: 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: 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)
returns 0-359 hue on color wheel
Parameters:
_col :
Returns: 360 degree hue value
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
HSL
ColorExtensionLibrary "ColorExtension"
Color Extension methods.
hsl(hue, saturation, lightness, transparency) HSL color transform.
Parameters:
hue : float, hue color component, hue is a degree on the color wheel from 0 to 360. 0 is red, 120 is green, 240 is blue.
saturation : float, saturation color component, saturation is a percentage value, 0 means a shade of gray and 100 is the full color.
lightness : float, lightness color component, Lightness is also a percentage; 0 is black, 100 is white.
transparency : float, transparency color component, transparency is also a percentage; 0 is opaque, 100 is transparent.
Returns: color
rgb_to_hsl(red, green, blue) Convert RGB to HSL color values
Parameters:
red : float, red color component.
green : float, green color component.
blue : float, blue color component.
Returns: tuple with 3 float values, hue, saturation and lightness.
complement(primary) Complementary of selected color
Parameters:
primary : color, the primary
Returns: color.
invert(primary) Inverts selected color.
Parameters:
primary : color, the primary.
Returns: color.
is_cool(base) Color is cool or warm.
Parameters:
base : color, the color to check.
Returns: bool.
temperature(base) Color temperature.
Parameters:
base : color, the color to check.
Returns: bool.
is_high_key(base) Color is high key (orange yellow green).
Parameters:
base : color, the color to check.
Returns: bool.
mix(base, mix, rate) Mix two colors together.
Parameters:
base : color, the base color.
mix : color, the color to mix.
rate : float, default=0.5, the rate of mixture, range within 0.0 and 1.0.
Returns: color.
analog(primary) Selects 2 near spectrum colors (H +/- 45).
Parameters:
primary : color, the base color.
Returns: tuple with 2 colors.
triadic(primary) Selects 2 far spectrum colors (H +/- 120).
Parameters:
primary : color, the base color.
Returns: tuple with 2 colors.
tetradic(primary) Uses primary and the complementary color, + 60º to form a rectangular pattern on the color wheel.
Parameters:
primary : color, the base color.
Returns: tuple with 3 colors.
square(primary) Uses primary and generate 3 equally spaced (90º) colors.
Parameters:
primary : color, the base color.
Returns: tuple with 3 colors.