Public
Edited
Oct 2, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function toAlpha(num){
return num.toString(16).padStart(2, '0')
}
Insert cell
viewof colorStore = {
const inputs = Inputs.input({
quest: Inputs.input({
stroke: "#ff7700",
strokeAlpha: 0xff,
color1: "#ff9442",
alpha1: 0x22,
position1: 10,
color2: "#ff9442",
alpha2: 0x22,
position2: 50,
color3: "#ff9442",
alpha3: 0x46,
position3: 95
}),
fate: Inputs.input({
stroke: "#6698d3",
strokeAlpha: 0xff,
color1: "#6698d3",
alpha1: 0x22,
position1: 10,
color2: "#6698d3",
alpha2: 0x22,
position2: 50,
color3: "#6698d3",
alpha3: 0x46,
position3: 95
}),
leve: Inputs.input({
stroke: "#49b135",
strokeAlpha: 0xff,
color1: "#68bc57",
alpha1: 0x22,
position1: 10,
color2: "#68bc57",
alpha2: 0x22,
position2: 50,
color3: "#68bc57",
alpha3: 0x46,
position3: 95
})
});
inputs.addEventListener('input', ()=>{
console.log(2)
})
inputs.value.quest.addEventListener('input', ()=>{
inputs.dispatchEvent(new Event("input", {bubbles: true}))
})
inputs.value.fate.addEventListener('input', ()=>{
inputs.dispatchEvent(new Event("input", {bubbles: true}))
})
inputs.value.leve.addEventListener('input', ()=>{
inputs.dispatchEvent(new Event("input", {bubbles: true}))
})
return inputs
}
Insert cell
unocss = import('https://cdn.jsdelivr.net/npm/@unocss/runtime/uno.global.js')
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