Color¶
17 nodes. Types ending in [] are lists. An input with a default is optional.
Nodes¶
Color.ByARGB¶
Creates a color from alpha, red, green and blue values (0-255).
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
a |
integer |
255 |
Alpha channel, 0–255 (default fully opaque). |
r |
integer |
0 |
Red channel, 0–255. |
g |
integer |
0 |
Green channel, 0–255. |
b |
integer |
0 |
Blue channel, 0–255. |
Outputs
| Output | Type | What it gives |
|---|---|---|
color |
Color |
The color. |
Tags: rgb argb rgba
Color.ByHSV¶
Creates a color from hue (degrees, wraps around), saturation and value (0-1, clamped).
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
hue |
number |
0 |
Hue in degrees (0 = red, 120 = green, 240 = blue); wraps around. |
saturation |
number |
1 |
Saturation, 0 (grey) to 1 (vivid); clamped. |
value |
number |
1 |
Value (brightness), 0 (black) to 1 (full); clamped. |
alpha |
integer |
255 |
Alpha channel, 0–255 (default fully opaque). |
Outputs
| Output | Type | What it gives |
|---|---|---|
color |
Color |
The color. |
Tags: hsv hsb hue saturation brightness create
Color.ByValues¶
One color per value, equal values sharing a color — feed parameter values in, feed the colors to Appearance.OverrideColor per group, and use the uniqueValues/uniqueColors legend for reports. Optional own palette (cycled). An empty list of values (a search that found nothing) gives empty lists, not an error.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
values required |
any[] |
— | One value per element (property values, numbers, names, ...). |
colors |
any[] |
null |
Optional palette: colors or "#RRGGBB" strings, used in order and cycled. |
Outputs
| Output | Type |
|---|---|
colors |
Color[] |
uniqueValues |
any |
uniqueColors |
Color[] |
Returns: A color per input value, and the distinct values with their colors (index-aligned legend); all three are empty for an empty list.
Tags: color by value parameter property categorical legend map group
Color.Components¶
Splits a color into its red, green, blue and alpha channels (0-255).
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
color required |
Color |
— | The color to decompose. |
Outputs
| Output | Type |
|---|---|
red |
integer |
green |
integer |
blue |
integer |
alpha |
integer |
Returns: Dictionary with "red", "green", "blue" and "alpha" values (0-255).
Tags: deconstruct channels rgb argb
Color.ContrastText¶
Black or white, whichever reads better on a background color (WCAG contrast) — for labels on coloured fills and legends.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
background required |
Color |
— | The fill color the text will sit on. |
Outputs
| Output | Type | What it gives |
|---|---|---|
color |
Color |
Opaque black or opaque white. |
Tags: contrast text label legible readable accessibility wcag black or white foreground
Color.Darken¶
Makes a color darker by shifting its HSL lightness down by amount (0-1, clamped); alpha is kept.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
color required |
Color |
— | The color to darken. |
amount |
number |
0.2 |
How much lightness to remove, 0 (none) to 1 (black); clamped. |
Outputs
| Output | Type | What it gives |
|---|---|---|
color |
Color |
The darker color. |
Tags: darker shade dim lightness hsl
Color.FromHex¶
Parses a hex color string ("#RRGGBB" or "#AARRGGBB").
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
hex required |
string |
— | The hex string, e.g. "#FF8800". |
Outputs
| Output | Type | What it gives |
|---|---|---|
color |
Color |
The parsed color. |
Tags: hex html web parse
Color.Gradient¶
A list of N colors evenly blended between two colors (endpoints included; defaults blue to red) — for heat-map style legends and value ramps. A count of 0 gives an empty list; the most it makes is 1,000,000.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
count |
integer |
5 |
How many colors to generate (0 gives an empty list; at most 1,000,000). |
start |
Color |
null |
First color of the gradient (empty = blue). |
end |
Color |
null |
Last color of the gradient (empty = red). |
Outputs
| Output | Type | What it gives |
|---|---|---|
colors |
Color[] |
The gradient colors, start to end. |
Tags: gradient ramp blend range between interpolate list series
Color.Invert¶
Inverts a color's red, green and blue channels (the photographic negative); alpha is kept.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
color required |
Color |
— | The color to invert. |
Outputs
| Output | Type | What it gives |
|---|---|---|
color |
Color |
The inverted color. |
Tags: negative opposite complement flip reverse
Color.Lerp¶
Interpolates between two colors (t clamped to 0-1). A t that is not a number (NaN) gives the start color and a warning.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
start required |
Color |
— | Color at t = 0. |
end required |
Color |
— | Color at t = 1. |
t required |
number |
— | Interpolation parameter (clamped to 0–1; NaN counts as 0, with a warning). |
Outputs
| Output | Type | What it gives |
|---|---|---|
color |
Color |
The interpolated color. |
Tags: interpolate blend gradient mix
Color.Lighten¶
Makes a color lighter by shifting its HSL lightness up by amount (0-1, clamped); alpha is kept.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
color required |
Color |
— | The color to lighten. |
amount |
number |
0.2 |
How much lightness to add, 0 (none) to 1 (white); clamped. |
Outputs
| Output | Type | What it gives |
|---|---|---|
color |
Color |
The lighter color. |
Tags: lighter brighten tint pale lightness hsl
Color.Palette¶
A named palette as a list of colors: colourblind-safe, tableau, pastel, status (green/amber/red/grey) or the viridis, heat and grey ramps interpolated to count; fixed palettes cycle past their size.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
name |
string |
"colourblind" |
Palette name: colourblind, tableau, pastel, status, viridis, heat or grey. |
count |
integer |
8 |
How many colors to return (1–256). |
Outputs
| Output | Type | What it gives |
|---|---|---|
colors |
Color[] |
The palette colors. |
Tags: palette scheme colourblind colorblind okabe ito tableau viridis heatmap gray ramp categorical legend list
Color.Random¶
A pseudo-random color, stable per seed: the same seed always gives the same color (re-runs stay consistent); change the seed for another one.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
seed |
integer |
0 |
Any number; each seed maps to one fixed color. |
Outputs
| Output | Type | What it gives |
|---|---|---|
color |
Color |
The color. |
Tags: random seed generate any
Color.RandomList¶
A list of visually distinct pseudo-random colors (golden-angle hues), stable per seed — ideal for coloring N groups apart. A count of 0 gives an empty list (no groups, no colors); the most it makes is 1,000,000.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
count |
integer |
5 |
How many colors to generate (0 gives an empty list; at most 1,000,000). |
seed |
integer |
0 |
Any number; each seed yields one fixed sequence. |
Outputs
| Output | Type | What it gives |
|---|---|---|
colors |
Color[] |
The colors. |
Tags: random list palette distinct generate series
Color.ToHex¶
Formats a color as hex text, "#RRGGBB" (or "#AARRGGBB" with includeAlpha) — the reverse of Color.FromHex.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
color required |
Color |
— | The color to format. |
includeAlpha |
boolean |
false |
True to prefix the alpha channel ("#AARRGGBB"); false drops it ("#RRGGBB"). |
Outputs
| Output | Type | What it gives |
|---|---|---|
hex |
string |
The hex text. |
Tags: hex html web string text format css
Color.ToHSV¶
Splits a color into hue (degrees, 0-360), saturation and value (0-1); greys have hue 0.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
color required |
Color |
— | The color to decompose. |
Outputs
| Output | Type |
|---|---|
hue |
number |
saturation |
number |
value |
number |
Returns: Dictionary with "hue" (0–360, 0 for greys), "saturation" and "value" (0–1).
Tags: hsv hsb hue saturation brightness deconstruct components
Color.WithAlpha¶
Returns a color with its alpha (opacity) replaced, 0 = transparent to 255 = opaque; red, green and blue are unchanged.
Inputs
| Input | Type | Default | What it does |
|---|---|---|---|
color required |
Color |
— | The color to change. |
alpha |
integer |
255 |
The new alpha, 0 (transparent) to 255 (opaque); clamped. |
Outputs
| Output | Type | What it gives |
|---|---|---|
color |
Color |
The color with the new alpha. |
Tags: alpha opacity transparency transparent set