Published
Edited
May 13, 2022
Insert cell
Insert cell
mutable currentColours = ({ zero,one,two,three} )
Insert cell
Insert cell
Insert cell
Insert cell
three =[0,0,0]
Insert cell
currentColours.zero
Insert cell
currentColours
Insert cell
_.join( currentColours.zero)
Insert cell
ui = {
let ui = html` <div id='zero' style='background:rgb(${_.join( currentColours.zero)}); '>Colour Zero</div>
<div id='one' style='background:rgb(${_.join( currentColours.one)}); '>Colour One</div>
<div id='two' style='background:rgb(${_.join( currentColours.two)}); '>Colour Two</div>
<div id='three' style='background:rgb(${_.join( currentColours.three)}); '>Colour Three</div>`
return ui;
}
Insert cell
{ mutable currentColours = {...mutable currentColours, zero: [255,0,0,]};}
Insert cell
{ mutable currentColours = {...mutable currentColours, one: [50,50,150,]}; }
Insert cell
{ mutable currentColours = {...mutable currentColours, two: [0,200,0,]}; }
Insert cell
{ mutable currentColours = {...mutable currentColours, three: [140,140,0,]}; }
Insert cell
_ = require('lodash')
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