Published
Edited
Feb 6, 2022
1 fork
Importers
8 stars
Insert cell
Insert cell
Insert cell
viewof colors = Inputs.form([
colorOpacity({value: '#ff95008c', label: 'Start color'}),
colorOpacity({value: '#6bffff24', label: 'Mid color'}),
colorOpacity({value: '#00ccff', label: 'End color'}),
])
Insert cell
Insert cell
Insert cell
Insert cell
colorOpacity({
value: '#ff95008c',
label: html`<code style="text-decoration: underline">Color`,
disabled: true,
width: '75%',
})
Insert cell
Insert cell
colorOpacity({min: 50, max: 150, step: 10})
Insert cell
Insert cell
viewof pastelColor = colorOpacity({
value: '#ffd8eeff',
// Only allow colors with a lightness over 85%
validate: input => d3.hsl(input.value).l > .85,
})
Insert cell
<div style=${{background: pastelColor, height: '30px', border: '1px solid #aaa'}}>
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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