Published
Edited
May 1, 2020
Insert cell
md`# Lab interpolation`
Insert cell
blue = d3.lab('blue')
Insert cell
white = d3.lab('white')
Insert cell
f = d3.interpolate( blue, white )
Insert cell
lightblue = f(0.5)
Insert cell
blue.formatRgb()
Insert cell
white.formatRgb()
Insert cell
lightbluestring = d3.lab( lightblue.l, lightblue.a, lightblue.b ).formatRgb()
Insert cell
html`<div style="width: 100px; height: 100px; background-color: ${lightbluestring}" />`
Insert cell
d3 = require('d3', 'd3-color', 'd3-cam02');
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