SieveColorSpace

Colormaps

How they work

Each SCS colormap is a geodesic path on the simplex delta-2 with coupled luminance ramp. The construction has two steps:

  1. Chromaticity path: multi-waypoint geodesic on delta-2, reparameterized by gamma-weighted Fisher arc length (equal chromatic steps).

  2. Luminance ramp: arcsin parameterization (ell = sin^2(theta)) so that equal parameter steps produce equal Fisher-Bernoulli distances (equal luminance steps).

The two are then coupled: the total path (ell, pi) is reparameterized by combined Fisher arc length:

d^2_total = (3/4) * d_lum^2 + (1/4) * d_chrom^2

This ensures uniform perceptual steps along the entire colormap.

Available colormaps

Sequential

Name Colors Use case
scs_spectrum purple -> blue -> cyan -> green -> yellow General scientific (PT viridis)
scs_turbo blue -> cyan -> green -> yellow -> red Full rainbow, no false contours
scs_magma black -> purple -> orange -> pale yellow Dark-to-bright intensity
scs_terrain deep blue -> teal -> green -> brown -> white Elevation, bathymetry
scs_vegetation red-brown -> orange -> yellow -> green -> dark green NDVI, biomass, forest cover
scs_medical dark blue-gray -> warm white MRI, CT, X-ray (high lum range)
scs_thermal blue -> red Heat maps
scs_cool blue -> green Ocean depth
scs_warm green -> red Activation, intensity
scs_full blue -> green -> red Full spectrum

Diverging

Name Colors Use case
scs_diverging blue <- neutral -> red Anomalies, T-statistics
scs_seismic strong blue <- white -> strong red Seismic, gravity anomalies

Usage with matplotlib

from scs.colormaps import register_matplotlib
register_matplotlib()

import matplotlib.pyplot as plt

# Use by name
plt.imshow(data, cmap='scs_spectrum')

# Or get the array directly
from scs.colormaps import scs_vegetation
cmap_array = scs_vegetation(256)  # (256, 3) float sRGB

Comparison with standard colormaps

Perceptual uniformity measured by coefficient of variation (CV) of successive Fisher distances. Lower = more uniform.

Colormap CV total Dead zones Parameters
scs_diverging 0.063 0.4% 0
scs_vegetation 0.101 0% 0
scs_spectrum 0.102 0% 0
scs_medical 0.145 0% 0
scs_seismic 0.175 0% 0
scs_turbo 0.198 0% 0
scs_terrain 0.216 0.4% 0
scs_magma 0.230 0% 0
viridis 0.286 0% fitted
turbo 0.292 1.6% empirical
inferno 0.634 2.4% fitted
jet 0.661 1.6% empirical

9 out of 12 SCS colormaps beat viridis in Fisher uniformity.

When to use SCS colormaps vs standard ones

Use SCS when:

Use standard when: