Published
Edited
Nov 30, 2021
1 star
Also listed in…
Color
Insert cell
Insert cell
lut("bubblegum").then(ramp)
Insert cell
Insert cell
lut = name =>
d3
.text(
`https://raw.githubusercontent.com/1313e/CMasher/master/cmasher/colormaps/${name}/${name}_8bit.txt`
)
.then(d => d3.dsvFormat(" ").parseRows(d, d => d3.rgb(d[0], d[1], d[2])))
.then(l => t => l[Math.floor(t * (l.length - 1e-7))])
Insert cell
html`${await Promise.all(
names.map(
async color => html`<h4>${color}</h4>${await lut(color).then(ramp)}<p>`
)
)}`
Insert cell
import { ramp } from "@mbostock/color-ramp"
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more