Public
Edited
Sep 24, 2024
Importers
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
darkMode
Insert cell
lightMode = !darkMode
Insert cell
Insert cell
Insert cell
darkMode = {
if (!mutable __listening) {
mutable __listening = true

matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (event) => {
mutable __raw = !!event.matches
})
}

return __raw
}
Insert cell
mutable __raw = matchMedia('(prefers-color-scheme: dark)').matches
Insert cell
mutable __listening = false
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