Skip to content

tol:rainbow_WhRd#

collection category license authors source
tol Miscellaneous BSD-3-Clause Paul Tol https://personal.sron.nl/~pault/
from cmap import Colormap

cm = Colormap("tol:rainbow_WhRd")  # case insensitive
import matplotlib.pyplot as plt
from cmap import Colormap

plt.imshow(data, cmap=Colormap("tol:rainbow_WhRd").to_mpl())
import plotly.express as px
from cmap import Colormap

px.imshow(data, color_continuous_scale=Colormap("tol:rainbow_WhRd").to_plotly())
import napari
from cmap import Colormap

napari.imshow(data, colormap=Colormap("tol:rainbow_WhRd").to_napari())
napari.run()
background: #E8ECFB;
background: linear-gradient(90deg, #E8ECFB 0%, #DDD8EF 3.44828%, #D1C1E1 6.89655%, #C3A8D1 10.3448%, #B58FC2 13.7931%, #A778B4 17.2414%, #9B62A7 20.6897%, #8C4E99 24.1379%, #6F4C9B 27.5862%, #6059A9 31.0345%, #5568B8 34.4828%, #4E79C5 37.931%, #4D8AC6 41.3793%, #4E96BC 44.8276%, #549EB3 48.2759%, #59A5A9 51.7241%, #60AB9E 55.1724%, #69B190 58.6207%, #77B77D 62.069%, #8CBC68 65.5172%, #A6BE54 68.9655%, #BEBC48 72.4138%, #D1B541 75.8621%, #DDAA3C 79.3103%, #E49C39 82.7586%, #E78C35 86.2069%, #E67932 89.6552%, #E4632D 93.1034%, #DF4828 96.5517%, #DA2222 100%);
import altair as alt
from cmap import Colormap

# df: a DataFrame with columns x, y and value
alt.Chart(df).mark_rect().encode(
    x="x:O",
    y="y:O",
    color=alt.Color(
        "value:Q", scale=alt.Scale(range=Colormap("tol:rainbow_WhRd").to_altair())
    ),
)
from bokeh.plotting import figure, show
from cmap import Colormap

p = figure()
p.image(
    image=[data], x=0, y=0, dw=1, dh=1,
    color_mapper=Colormap("tol:rainbow_WhRd").to_bokeh(),
)
show(p)
from vispy import app, scene
from cmap import Colormap

canvas = scene.SceneCanvas(show=True)
view = canvas.central_widget.add_view()
scene.visuals.Image(data, cmap=Colormap("tol:rainbow_WhRd").to_vispy(), parent=view.scene)
view.camera = scene.PanZoomCamera(aspect=1)
view.camera.set_range()
app.run()
import pygfx as gfx
from cmap import Colormap

image = gfx.Image(
    gfx.Geometry(grid=gfx.Texture(data, dim=2)),
    gfx.ImageBasicMaterial(
        clim=(data.min(), data.max()), map=Colormap("tol:rainbow_WhRd").to_pygfx()
    ),
)
gfx.show(image)
import pyqtgraph as pg
from cmap import Colormap

view = pg.image(data)
view.setColorMap(Colormap("tol:rainbow_WhRd").to_pyqtgraph())
pg.exec()
import ee
from cmap import Colormap

ee.Initialize(project="my-project")  # your Google Cloud project
elevation = ee.Image("CGIAR/SRTM90_V4")
image = elevation.visualize(
    min=0, max=3000, palette=Colormap("tol:rainbow_WhRd").to_gee()
)

See also usage with external libraries.

tol:rainbow_WhRdtol:rainbow_WhRd colormap
tol:rainbow_WhRdtol:rainbow_WhRd colormap

Perceptual lightness#

Lightness (J′) measured in CAM02 Uniform Color Space (CAM02-UCS)

RGB components#

Hue & saturation#