Mesh Gradient Shader
A flowing composition of animated color spots, shaped by organic distortion and vortex effects. Powered by Paper Design Shaders.
Features
- Up to 10 customizable color spots in any CSS color format.
- Independent distortion and swirl controls for organic or structured looks.
- Optional grain effects for added texture.
- Animatable with speed control — set to
0for a static gradient.
Examples
Ocean
Sunset
Monochrome
Static
Set speed={0} to freeze the gradient — useful as a decorative background.
Playground
Adjust distortion, swirl, speed, and grain to explore the full range of the shader.
Controls
Distortion0.3
Swirl0.2
Speed1
Grain0
Installation
Usage
Props
| Property | Type | Default | Description |
|---|---|---|---|
colors | string[] | ["#ff6b6b", "#4ecdc4", "#45b7d1", "#96ceb4", "#ffeaa7"] | Up to 10 color spots. Accepts hex, RGB, or HSL strings. |
distortion | number | 0.3 | Power of organic noise distortion (0–1). |
swirl | number | 0.2 | Power of vortex distortion (0–1). |
grainMixer | number | 0 | Grain distortion on color edges (0–1). |
grainOverlay | number | 0 | Post-processing grain overlay (0–1). |
speed | number | 1 | Animation speed multiplier. 0 = static. |