colorcet:CET_L14#
Aliases: colorcet:l14, colorcet:greenternary, colorcet:linear_ternary_green_0_46_c42_n256
green colour map for ternary images
| collection | category | license | authors | source |
|---|---|---|---|---|
| colorcet | Sequential | CC-BY-4.0 | Peter Kovesi | https://colorcet.com |
from cmap import Colormap
cm = Colormap("colorcet:CET_L14") # case insensitive
import matplotlib.pyplot as plt
from cmap import Colormap
plt.imshow(data, cmap=Colormap("colorcet:CET_L14").to_mpl())
import plotly.express as px
from cmap import Colormap
px.imshow(data, color_continuous_scale=Colormap("colorcet:CET_L14").to_plotly())
import napari
from cmap import Colormap
napari.imshow(data, colormap=Colormap("colorcet:CET_L14").to_napari())
napari.run()
background: #000000;
background: linear-gradient(90deg, #000000 0%, #000800 3.22581%, #000F00 6.45161%, #001400 9.67742%, #001800 12.9032%, #001C00 16.129%, #001F00 19.3548%, #002300 22.5806%, #002600 25.8065%, #002A00 29.0323%, #002D00 32.2581%, #003100 35.4839%, #003400 38.7097%, #003800 41.9355%, #003C00 45.1613%, #003F00 48.3871%, #004300 51.6129%, #004700 54.8387%, #004B00 58.0645%, #004F00 61.2903%, #005300 64.5161%, #005700 67.7419%, #005A00 70.9677%, #005E00 74.1935%, #006300 77.4194%, #006700 80.6452%, #006B00 83.871%, #006F00 87.0968%, #007300 90.3226%, #007700 93.5484%, #007B00 96.7742%, #008000 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("colorcet:CET_L14").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("colorcet:CET_L14").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("colorcet:CET_L14").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("colorcet:CET_L14").to_pygfx()
),
)
gfx.show(image)
import pyqtgraph as pg
from cmap import Colormap
view = pg.image(data)
view.setColorMap(Colormap("colorcet:CET_L14").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("colorcet:CET_L14").to_gee()
)
See also usage with external libraries.
colorcet:CET_L14
colorcet:CET_L14
Perceptual lightness#
Lightness (J′) measured in CAM02 Uniform Color Space (CAM02-UCS)