Color Palette
Ready-made analysis gradients: perceptual (Viridis, Cividis - colour-blind safe), Turbo, Ladybug, thermal, wind and diverging sets for differences. Feed the colours to any Colors / CustomColors input.
Overview
Ready-made analysis gradients: perceptual (Viridis, Cividis - colour-blind safe), Turbo, Ladybug, thermal, wind and diverging sets for differences. Feed the colours to any Colors / CustomColors input.
Inputs (3)
- Name (Text): Palette name (see Names output)
- Count (Integer): Number of colours to return (0 = the palette's own stops)
- Reverse (Boolean): Flip the gradient
Outputs (2)
- Colors (Colour): Gradient colours, low to high
- Names (Text): All available palette names (diverging ones marked)
Method, assumptions and simplifications
The same notes appear in the component's Info output.
Method
- Looks up Name in a fixed table of palettes, each stored as 7 to 11 RGB stops (Viridis, Cividis, Magma, Turbo, Ladybug, ColorBrewer and cmocean sets, among others). Matching ignores case, spaces and hyphens; a trailing _r or reversed flips it; a number picks a palette by index.
- Reverse flips the stops; with Count >= 2 (max 1024) the gradient is resampled to Count evenly spaced colours by linear interpolation in RGB, otherwise the palette's own stops are returned.
Assumptions
- Colours are used low to high, matching the order of the analysis values.
Simplifications and limits
- Stops are samples of the published colour maps; resampling is linear in RGB, not in a perceptual colour space, so very fine resampling is only approximately perceptually even.
Workflow
- Color Palette Colors -> Colors or CustomColors input of any analysis component.
References
- Nuñez J.R., Anderton C.R. and Renslow R.S. (2018), Optimizing colormaps with consideration for color vision deficiency, PLOS ONE: Cividis.
- Thyng K.M. et al. (2016), True colors of oceanography, Oceanography 29(3): cmocean palettes.
- Harrower M. and Brewer C.A. (2003), ColorBrewer.org, The Cartographic Journal 40(1).
- Moreland K. (2009), Diverging color maps for scientific visualization: Coolwarm.