Public
Edited
May 16, 2023
Paused
7 stars
Insert cell
Insert cell
Insert cell
Insert cell
spectral = require("spectral.js@2")
Insert cell
Insert cell
Insert cell
hex3 = {
const rgb1 = "rgb(0, 33, 133)"; // blue
const rgb2 = "rgb(252, 211, 0)"; // yellow
const mixFormat = 0.5;

return spectral.mix(rgb1, rgb2, mixFormat);
}
Insert cell
rgb3 = {
const hex1 = "#00357B"; // blue
const hex2 = "#D79900"; // yellow
const mixFactor = 0.5;
const returnFormat = spectral.RGB;

return spectral.mix(hex1, hex2, mixFactor, returnFormat);
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import {
viewof palette,
viewof firstMixingPigmentName,
viewof firstPigment,
viewof secondMixingPigmentName,
viewof secondPigment,
viewof settings,
viewof threeD,
viewof exploringPigmentName,
viewof exploringPigment,
pigments,
mixingPath,
addTooltips,
tooltip,
swatch,
swatchN,
oneToOnePath,
oneToManyPaths,
manyToManyPaths
} with {
facetDomain as facetDomain,
DEFAULT_SECOND_MIXING_PIGMENT_NAME as DEFAULT_SECOND_MIXING_PIGMENT_NAME
} from "@mjbo/hello-mixbox"
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