Why Re is out: see what's new Lifetime updates on every purchase Support replies within 24 hours Secure checkout via Gumroad 8,500+ sales since 2016

↑↓ Navigate ↵ Open Esc Close

All products
Re:Maily contact form builder is now available on WordPress.org See it live

Smooth Background JavaScript Color Transition Plugin

  • Plugins
  • Version2.0.0
  • Sales1
  • UpdatedOct 7, 2026
  • Views9
Smooth Background | JavaScript Color Transition Plugin

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.

Specifications

Highlights

Browsers

  • ChromeChrome
  • FirefoxFirefox
  • SafariSafari
  • EdgeEdge

Files included

  • JSJS

Changelog

2.0.0Latest · Oct 7, 2026 Show changelogHide changelog
  1. 2.0.0 Latest
    • Newscroll mode with smooth interpolation, container and trigger support.
    • Newsections mode, with data-sbg-class and activeClass for manual light/dark styling.
    • Newseveral properties per palette entry, CSS custom properties and gradients.
    • NewOKLab / OKLCH interpolation with gamut mapping and premultiplied alpha.
    • Newhold, direction, iterations, easing presets and cubic-bezier().
    • Newplay, pause, toggle, goTo, update, refresh, callbacks and DOM events.
    • Newdata attribute auto-init, TypeScript definitions, ESM/CJS/browser builds.
    • Newprefers-reduced-motion support, off-screen pause, CSP-friendly rendering.