mix=spectral.mix(start,end,mixFactor)// returns a new colour from the start and end colour
ramp(()=>spectral.mix(start,end,mixFactor,))// returning one value as above
ramp(c=>spectral.mix(start,end,c))// can't get the mix factor to work in this render
ramp(d3.interpolate(start,end))
ramp(d3.interpolate(start,mix))
ramp(d3.interpolate(mix,end))
ramp(d3.interpolateLab(start,end))
ramp(d3.interpolateLab(start,mix))
ramp(d3.interpolateLab(mix,end))
ramp(d3.interpolateHsl(start,end))
ramp(d3.interpolateHsl(start,mix))
ramp(d3.interpolateHsl(mix,end))
ramp(d3.interpolateHcl(start,end))
ramp(d3.interpolateHcl(start,mix))
ramp(d3.interpolateHcl(mix,end))
// pairs of colours from "A Dictionary of Colour Combinations" compiled by Sanzo Wada
sanzoWadaPairs=sets.filter(d=>d.length===2);
spectral=require("spectral.js@2")
import{ramp}from"@mbostock/ramp"
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.