Smooth Background
Overview
Smooth background and text color transitions, on a timer, on scroll, or section by section. One tiny script, no dependencies.
Features
Three modes
Choose from loop, scroll or sections, depending on how you want the colors to move.
Perceptual color mixing
Colors blend the way the eye sees them, so transitions never turn muddy.
Many properties at once
Animate background, text, borders and CSS variables together. Gradients work too.
Light and dark sections
Add a class to any section and it goes on the page while that section is active.
Easy setup
Configure it with data attributes, no code needed, or use the full JavaScript API.
Accessible
It respects the visitor's reduced-motion setting and works under a strict CSP.
Lightweight
Pure JavaScript, no jQuery, about 7 KB gzipped, with TypeScript definitions included.
Buy with confidence
6mo
Support included
Extendable to 12 months
∞
Lifetime updates
No renewals or subscriptions
✓
Reviewed
Quality-checked by Envato
Specifications
Highlights
Browsers
Files included
Changelog
2.0.0Latest · Oct 7, 2026 Show changelogHide changelog
-
2.0.0 Latest
- New
scrollmode with smooth interpolation, container and trigger support. - New
sectionsmode, withdata-sbg-classandactiveClassfor manual light/dark styling. - Newseveral properties per palette entry, CSS custom properties and gradients.
- NewOKLab / OKLCH interpolation with gamut mapping and premultiplied alpha.
- New
hold,direction,iterations, easing presets andcubic-bezier(). - New
play,pause,toggle,goTo,update,refresh, callbacks and DOM events. - Newdata attribute auto-init, TypeScript definitions, ESM/CJS/browser builds.
- New
prefers-reduced-motionsupport, off-screen pause, CSP-friendly rendering.
- New