Color

NodeDescriptionInputsOutputs
complementReturns the complementary color.hex Texthex Text
darkenDarkens a color by a given amount.hex Text, amount Numberhex Text
from_hexParses a hex color string into an RGB object.hex Textcolor Json
from_hslConverts HSL values to an RGB object.h Number, s Number, l Numbercolor Json
lerpInterpolates between two colors.a Text, b Text, t Numberhex Text
lightenLightens a color by a given amount.hex Text, amount Numberhex Text
split_hslSplits a hex color into H, S, L components.color Texth Number, s Number, l Number
split_rgbSplits a hex color into R, G, B channels.color Textr Number, g Number, b Number
to_hexConverts RGB values to a hex color string.r Number, g Number, b Numberhex Text

complement

Returns the complementary color.

Inputs:

Output: hex (Text) — inverted hex color

darken

Darkens a color by a given amount.

Inputs:

Output: hex (Text) — darkened hex color

from_hex

Parses a hex color string into an RGB object.

Inputs:

Output: color (Json) — {r, g, b, hex} object

Example: hex = #ff0000{"b":0,"g":0,"hex":"#ff0000","r":255}

See also: to_hex, from_hsl

from_hsl

Converts HSL values to an RGB object.

Inputs:

Output: color (Json) — {r, g, b} object

lerp

Interpolates between two colors.

Inputs:

Output: hex (Text) — interpolated hex color

Example: a = #000000, b = #ffffff, t = 0.5#808080

See also: math/lerp, from_hex

lighten

Lightens a color by a given amount.

Inputs:

Output: hex (Text) — lightened hex color

split_hsl

Splits a hex color into H, S, L components.

Inputs:

Outputs:

Example: color = #ff00000

See also: from_hsl, split_rgb

split_rgb

Splits a hex color into R, G, B channels.

Inputs:

Outputs:

Example: color = #ff0000255

See also: to_hex, split_hsl

to_hex

Converts RGB values to a hex color string.

Inputs:

Output: hex (Text) — hex color string (e.g. #ff0000)