Skip to content

bids:inferno#

Aliases: matplotlib:inferno

collection category license authors source
bids Sequential CC0 Nathaniel J. Smith, Stefan van der Walt https://github.com/bids/colormap
from cmap import Colormap

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

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

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

napari.imshow(data, colormap=Colormap("bids:inferno").to_napari())
napari.run()
background: #000004;
background: linear-gradient(90deg, #000004 0%, #040313 3.22581%, #0B0725 6.45161%, #160B39 9.67742%, #220C4C 12.9032%, #310A5C 16.129%, #3F0A66 19.3548%, #4D0C6B 22.5806%, #5A116E 25.8065%, #67166E 29.0323%, #741B6E 32.2581%, #811F6C 35.4839%, #8E2469 38.7097%, #9B2964 41.9355%, #A82E5F 45.1613%, #B53358 48.3871%, #C13A51 51.6129%, #CC4248 54.8387%, #D74B3F 58.0645%, #E05536 61.2903%, #E8612C 64.5161%, #EF6D22 67.7419%, #F57B17 70.9677%, #F8890C 74.1935%, #FB9806 77.4194%, #FCA80D 80.6452%, #FBB81C 83.871%, #F9C830 87.0968%, #F6D847 90.3226%, #F2E763 93.5484%, #F3F585 96.7742%, #FCFFA4 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("bids:inferno").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("bids:inferno").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("bids:inferno").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("bids:inferno").to_pygfx()
    ),
)
gfx.show(image)
import pyqtgraph as pg
from cmap import Colormap

view = pg.image(data)
view.setColorMap(Colormap("bids:inferno").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("bids:inferno").to_gee()
)

See also usage with external libraries.

bids:infernobids:inferno colormap
bids:infernobids:inferno colormap

Perceptual lightness#

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

RGB components#

Hue & saturation#