Published
Edited
Nov 30, 2021
1 star
Also listed in…
Color schemes
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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more