Skip to content
Adam edited this page Jul 15, 2023 · 1 revision

Welcome to the 1D-RGB-color-gradient wiki!

color

human perception of the color

gradient forms

numbers aproximating transfer function

Paraview xml format:

<ColorMaps>
<ColorMap name="Consistency" space="RGB">
<Point x="-1.000" o="1" r="0.0" g="0.0" b="0.0"/>
<Point x="0.000" o="1" r="0.0" g="1.0" b="0.0"/>
<Point x="1.000" o="1" r="1.0" g="0.0" b="0.0"/>
</ColorMap>
</ColorMaps>

where:

  • x is a position
  • o is opacity
  • r,g,b are color channels

CCC-Tool xml format

<ColorMaps>
<ColorMap name="Custom CMS" space="RGB" interpolationspace="hsv" interpolationtype="linear" creator="CCC-Tool">
<Point x="0" o="1" r="0.999999918662032" g="0.0000017030280962126348" b="0" cms="1" isMoT="true"/>
<Point x="1" o="1" r="0.9999999186904281" g="0.0000017027413356322709" b="0.01666644639528109" cms="1" isMoT="true"/>
<NaN r="0.24999997648523203" g="8.664340746405535e-8" b="0"/>
<Above r="0" g="0" b="0"/>
<Below r="0" g="0" b="0"/>
</ColorMap>
</ColorMaps>

where

  • h has range [0,360]
  • s and v has range [0,100]

where:

dat files by Paul Bourke: index r g b in 0-255 range

0   0   0 255    
1   0   3 255     
2   0   7 255        
3   0  11 255       

CLUT

function ( 3 transfer functions) = colour map

image

  • stripe of colors ( ramp)
  • diagram of the function
  • CLUT image file
    • imagemagic: image is ordinarily a gradient image containing the histogram mapping of how each channel should be modified. Typically it is a either a single row or column image of replacement color values. If larger than a single row or column, values are taken from a diagonal line from top-left to bottom-right corners.
    • Paul Tol's Notes: data in pgm file, clut in ppm file, use Image magic convert to apply gradient
    • gimp
    • gmic
    • darktable

Features of colormaps:

general

technical

  • format
  • number of the gradient segments ( ramps)
  • type of interpolation function
  • numerical precision

discrete/continous

Description from Colorcet

  • The continuous colormaps are:
    • perceptually uniform, with each new color equally perceptually distinct from the previous and following colors
    • perceptually nonuniform. That is, small changes in data values result in large changes in the perceptual appearance of the corresponding colors, or vice versa. For instance, the popular matplotlib "hot" and "jet" colormaps have long stretches where the apparent colors change imperceptibly, such as the yellow region in "hot" and the cyan/green region in "jet":
  • The discrete = categorical colormaps are perceptually distinct, but not uniform; each color is meant for a separate category and not as a position on a numerical scale

hue

  • no hue = achromatic = gray scale
  • single hue = monochromatic
  • multihue = polichromatic = rainbow
    • two (double) hue = divergent

Description from Vega

For sequential data, it’s better to use palettes that have at most a relatively subtle shift in hue accompanied by a large shift in brightness and saturation. This approach will naturally draw the eye to the relatively important parts of the data.

  • [Sequential Single-Hue Schemes can be used to encode quantitative values. These color ramps are designed to encode increasing numeric values.
  • Sequential Multi-Hue Schemes can be used to encode quantitative values. These color ramps are designed to encode increasing numeric values, but use additional hues for more color discrimination, which may be useful for visualizations such as heatmaps. However, beware that using multiple hues may cause viewers to inaccurately see the data range as grouped into color-coded clusters.

Description by Gregor Aisch

While a (linear) variation in lightness is the most important quality of a sequential color scale, varying the hue can bring further significant improvements. Hue variation provides a better color contrast and thus makes the colors easier to differentiate.

Examples:

  • multi hue: viridis, magma, inferno, plasma, rainbow

perceptual uniformity

perceptual uniformity means that all pairs of adjacent colors will look equally different from each other

dimensions

  • 1D : for univariate data, see all above gradients
  • 2D : for bivariate data: bivariate colour map
  • 3D : trivariate colormaps

2D gradients (mesh gradients)

Rhino and Grasshopper

svg :

Formats: .sketch, .png, .ai, .jpg, .eps

Interpolation:

  • linear

number of the gradient segments ( ramps)

numerical precision

  • type and a range of the numbers: unsigned char and [0 ; 255] or double and [0.0 ; 1.0 ]
  • length of the numbers array ( proportional to precision of nonlinear function approximation. for linear function 2 points are enough)
  • function of color channel and the gradient segment: linear / nonlinear ( related what function is used for the interpolation between nodes)

Taxonomy of color gradients

data

Description:

lightness

Taxonomy of Colour Maps by Peter Kovesi

Taxonomy of contionus 1D colour maps according to the lightness:

  • monotone ( monotonic) with monotonic brightness (lightness)
    • linear = have colour lightness values that increase or decrease linearly over the colour map's range. Are intended for general use and have colour lightness values that increase or decrease linearly over the colour map's range
    • nonlinear
  • isoluminant: constant lightness and low contrast colour maps can be useful when displaying data with relief shading
  • non monotone or multisegment or complex

Names:

Description

hue

  • no hue = achromatic = gray scale
  • Single-Hue
  • Multi-Hue

Gradient goals (tasks) = goals of scientific visualisation

  • encode scalar values in univariate map data
  • Categorization task: visually categorize data

What features of data you want to highlight usung gradient ?

goals for 1D colormaps

  • metric: enable users to accurately read absolute values in data = Value reading tasks
  • form: gradient should enables users to correctly perceive the shape = Pattern Perception
  • order: colormaps must preserve the order in data
  • separation: different data must be perceived differently
  • uniformity: perceived differences in color must accurately reflect numerical data differences

Gradient metrics

Gradient aplications

Gradient complexity