Scroll Tint

The page background steeps from paper through ember to ink as you scroll deeper.

tint 0%
scroll ↓ the page changes mood
features
pricing
footer

Build a scroll-driven background tint: the page's background color interpolates through a palette as the user scrolls. The palette: three stops - paper at the top, a warm ember wash in the middle, deep ink at the bottom. Store them as RGB triples and interpolate linearly between adjacent stops based on scroll progress (0-1, computed as scrollTop / (scrollHeight - clientHeight)). Apply the mixed color directly to background-color every scroll frame - no CSS transition needed, the scrollbar IS the timeline, and it must track exactly. Text adaptation: when progress crosses the point where the background turns dark (~62%), flip foreground text to paper tones (a 0.3s color transition is fine here). A small sticky monospace indicator showing "tint 47%" makes the mechanic legible in a demo. Use a passive scroll listener; clamp progress to [0,1]. Sections along the way (hero, features, pricing, footer) give the journey structure - the color change becomes the narrative: the page gets more serious as you approach the close. Accessibility: ensure text contrast passes at every point of the gradient - test the middle stop especially. Under prefers-reduced-motion this still works (it's scroll-driven, not autonomous), but you may snap between the three stops instead of interpolating. Colors as tokens: derive all three stops from your paper, accent and ink. Build the component, not this demo of it. - Ambient motion that IS the component may loop: a drifting background, a marquee, a spinner while something is genuinely loading. - Do not add any timer, interval, loop or script that performs a person's action by itself. No auto-hover, no auto-click, no cycling through states, no pretend submitting, no replaying the interaction on a schedule. - Every state that answers a person waits for a real event from that person. - Placeholder copy and sample content are welcome. Simulated behaviour is not.

Rate it
0
0

We'd like to measure how the site gets used, with Google Analytics. It sets cookies. Everything the site needs to work runs either way. How we handle data