Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/colorful/llms.txt
Use this file to discover all available pages before exploring further.
FluidBackground produces the signature visual layer of the Colorful theme: a living, slowly shifting gradient that sits behind all page content. The component combines two techniques — four large blurred Framer Motion blobs that drift independently around the viewport, and a CSS keyframe animation that continuously scrolls the same color palette across the .bg-fluid-gradient and .text-fluid-clip utility classes — giving every page a sense of soft, organic movement without drawing attention away from the content in front of it.
How it works
The component renders a single<div> with the classes fixed inset-0 z-[-1] overflow-hidden pointer-events-none bg-[#fafaf9]. The fixed inset-0 pairing stretches it to fill the entire viewport at all times, and z-[-1] pushes it behind every other element in the stacking context. pointer-events-none ensures the background never intercepts clicks, scroll events, or keyboard focus.
Inside that root container, four motion.div blobs are placed with absolute positioning at different corners and regions of the canvas. Each blob is a large rounded circle with a theme color background and a heavy CSS blur applied:
| Blob position | Color token | Blur | Animation duration |
|---|---|---|---|
| Top-left | bg-teal-light | blur-[100px] | 20 s |
| Bottom-right | bg-rainbow-pink | blur-[120px] | 25 s |
| Center | bg-rainbow-amber | blur-[90px] | 22 s |
| Bottom-left | bg-rainbow-indigo | blur-[110px] | 18 s |
x, y, and scale properties on an infinite easeInOut loop, with each duration set to a different prime-adjacent number so the blobs drift out of phase and never repeat the exact same visual pattern.
An SVG <filter> with three primitives — feTurbulence, feColorMatrix, and feDisplacementMap — is embedded in the component and applied to the blob layer via filter: url(#fluid). feTurbulence generates fractal noise, feColorMatrix sharpens its contrast, and feDisplacementMap uses the result to warp the blob layer, breaking up hard circular edges and contributing to the fluid, painterly appearance. The blob layer is rendered at opacity-30 using mix-blend-multiply to let the warm off-white page background show through.
The @keyframes fluid-gradient animation
The fluid-gradient keyframe animation is defined in assets/main.css and drives both the .bg-fluid-gradient and .text-fluid-clip utility classes. It works by cycling the background-position of an oversized gradient (background-size: 400% 400%) back and forth:
Color tokens used
Both utility classes reference the same set of CSS custom properties defined in:root within assets/main.css:
| Token | Hex value | Role in gradient |
|---|---|---|
--color-teal-main | #14b8a6 | Gradient start |
--color-rainbow-indigo | #6366f1 | First mid-stop |
--color-rainbow-pink | #ec4899 | Second mid-stop |
--color-rainbow-amber | #f59e0b | Third mid-stop |
--color-teal-light | #2dd4bf | Gradient end |
The .bg-fluid-gradient and .text-fluid-clip utility classes
Both classes share the same color stops and animation but are applied to different elements and serve different purposes.
.bg-fluid-gradient applies the animated gradient as a standard background fill. It is used on the Navigation toggle button hover layer and anywhere a solid gradient background is needed:
.text-fluid-clip clips the same animated gradient to the text shape, producing the vivid rainbow fill used on large display headings across the theme:
.bg-fluid-gradient uses a -45deg angle while .text-fluid-clip uses 45deg, giving the heading text a slightly different flow direction from background elements.
Customizing the animation
Speed — Change the animation duration by editing the15s value in both utility class declarations inside assets/main.css. A higher value produces a slower, more subtle drift; a lower value makes the color shift more noticeable.
--color-* custom properties in the :root block at the top of assets/main.css. Every element using either utility class will pick up the new values automatically, including the Navigation hover gradient and all .text-fluid-clip headings.
Performance
FluidBackground uses two animation mechanisms. The CSS fluid-gradient keyframe animation drives the .bg-fluid-gradient and .text-fluid-clip classes: the background-size: 400% 400% technique shifts a CSS property that is composited on the GPU in all modern browsers, so those animations run on the compositor thread without triggering layout recalculations.
The four Framer Motion blob animations run on the JavaScript side, but they animate only x, y, and scale — transform-based properties — which keeps them off the layout thread and avoids costly repaints.