also called section theming · discrete palette swap · data-theme
The common form, and the honest one when two palettes are unrelated rather than a rotation apart. Everything rests on the transition: without one it strobes, and much past a second it lags the scroll and reads as a bug. These six palettes are not a rotation of one another — fog, blue morning, full sun, ochre noon, grey weather and evening have nothing in common but the stone — so they are written out, one per canvas, and the stage jumps between them. Each was taken from its painting in OKLab: its most common colour as the ground, moved out of the middle band where no type reads, and its most colourful as the accent.
How it is built
new IntersectionObserver(fn, { rootMargin: '-45% 0px -45% 0px' })
/* the canvas crossing eye level names itself: stage.dataset.light = … */
.rouen[data-light="l3"] { --ground: …; --ink: …; --accent: … } /* from the canvas */
.rouen { background: var(--ground); transition: background-color .7s }In full, on GitHub index.html showcase.css showcase.js
Paintings — Claude Monet, public domain, via Wikimedia Commons: The Cathedral in the Fog (private collection), Rouen Cathedral Façade and Tour d’Albane (Morning Effect) (Museum of Fine Arts, Boston), Rouen Cathedral, West Façade, Sunlight (National Gallery of Art, Washington), Rouen Cathedral at Noon (Pushkin Museum, Moscow), The Portal, Grey Weather (Musée d’Orsay, Paris), Rouen Cathedral in the Evening (Pushkin Museum, Moscow). Facts — Rouen Cathedral (Monet series). The palettes are taken from the paintings by build/palette.py.