Color
HSL Functions
hsl n1 n2 n3 shape
Returns shape
with its color set to n1
for hue, n2
for saturation, and n3
for lightness. n1
, n2
, and n3
must be of the integer or float types and shape
must be of the shape type.
Example:
hsla n1 n2 n3 n4 shape
Returns shape
with its color set to n1
for hue, n2
for saturation, n3
for lightness, and n4
for alpha. n1
, n2
, n3
and n4
must be of the integer or float types and shape
must be of the shape type.
Example:
h n shape
Returns shape
with its hue set to n
. n
must be of the integer or float types and shape
must be of the shape type.
Shorthand for the hue
function.
Example:
sat n shape
Returns shape
with its saturation set to n
. n
must be of the integer or float types and shape
must be of the shape type.
Shorthand for the saturation
function.
Example:
l n shape
Returns shape
with its lightness set to n
. n
must be of the integer or float types and shape
must be of the shape type.
Shorthand for the lightness
function.
Example:
a n shape
Returns shape
with its alpha set to n
. n
must be of the integer or float types and shape
must be of the shape type.
Shorthand for the alpha
function.
Example:
hshift n shape
Returns shape
with its hue shifted by n
. n
must be of the integer or float types and shape
must be of the shape type.
Example:
satshift n shape
Returns shape
with its saturation shifted by n
. n
must be of the integer or float types and shape
must be of the shape type.
Example:
lshift n shape
Returns shape
with its lightness shifted by n
. n
must be of the integer or float types and shape
must be of the shape type.
Example:
ashift n shape
Returns shape
with its alpha shifted by n
. n
must be of the integer or float types and shape
must be of the shape type.
Example:
RGB Functions
hex color shape
Returns shape
with its color set to color
. color
must be of the hexadecimal type and shape
must be of the shape type.
Example:
Gradient Functions
solid shape
Returns shape
with its gradient removed and its color set to a solid white.
Example:
g grad shape
Returns shape
with its gradient set to grad
.
Shorthand for the gradient
function.
Example:
linear_grad start_x start_y end_x end_y
Returns a gradient object with a linear transition from (start_x
, start_y
) to (end_x
, end_y
). Accepts integer and float types.
Example:
radial_grad start_x start_y end_x end_y radius
Returns a gradient object with a radial transition from (start_x
, start_y
) to (end_x
, end_y
) and a radius of radius
. Accepts integer and float types.
Example:
grad_start x y grad
Returns grad
with its start position set to (x
, y
). x
and y
must be of the integer or float types.
Example:
grad_end x y grad
Returns grad
with its end position set to (x
, y
). x
and y
must be of the integer or float types.
Example:
to_linear_grad grad
Converts grad
to a linear gradient.
Example:
grad_radius radius grad
Returns grad
with its radius set to radius
, converting it to a radial gradient if necessary. radius
must be of the integer or float types.
Example:
grad_stop_hsl pos n1 n2 n3 grad
Returns grad
with its color at position pos
set to n1
for hue, n2
for saturation, and n3
for lightness. pos
, n1
, n2
, and n3
must be of the integer or float types.
Example:
grad_stop_hsla pos n1 n2 n3 n4 grad
Returns grad
with its color at position pos
set to n1
for hue, n2
for saturation, n3
for lightness, and n4
for alpha. pos
, n1
, n2
, n3
, and n4
must be of the integer or float types.
Example:
grad_stop_hex pos color grad
Returns grad
with its color at position pos
set to n1
for hue, n2
for saturation, and n3
for lightness. pos
, n1
, n2
, and n3
must be of the integer or float types.
Example:
grad_spread_mode sm grad
Returns grad
with its spread mode set the sm
.
Example:
Last updated