Public
Edited
Mar 22, 2023
Insert cell
Insert cell
viewof color = {
const red = Inputs.range([0, 15], { label: "Red", step: 1 });
const green = Inputs.range([0, 15], { label: "Green", step: 1 });
const blue = Inputs.range([0, 15], { label: "Blue", step: 1 });
const swatch = html`<div style="width: 100px; height: 100px; background-color: rgb(${
red.value * 16
}, ${green.value * 16}, ${blue.value * 16});" />`;

const form = Inputs.form({
swatch,
red,
green,
blue
});
return form;
}
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