Skip to main content

Overview

Paper Shaders are highly customizable through parameters that control colors, animation, distortion, and visual effects. This guide covers how to customize shaders to match your design needs.

Using Presets

Each shader comes with carefully crafted presets that showcase different aesthetics:

Available Preset Exports

Each shader component exports its presets:

Color Customization

Color Formats

Shaders accept colors in multiple formats:

Color Limits

Each shader has a maximum color count:
Common limits:
  • MeshGradient: 10 colors
  • DotOrbit: 40 colors
  • GodRays: 5 colors
  • Warp: 10 colors
  • StaticMeshGradient: 10 colors
  • StaticRadialGradient: 10 colors

Working with Alpha

Colors support transparency:
Transparent colors let background elements show through, enabling layered effects.

Parameter Ranges

Most shader parameters use normalized 0-1 ranges for consistency:

Common Parameters

Speed Parameter

The speed parameter is special:
When speed={0}, requestAnimationFrame stops entirely, making static shaders completely free from ongoing performance costs.

Frame Parameter

Set starting frame for deterministic results:

Shader-Specific Parameters

MeshGradient

DotOrbit

Water (Image Filter)

Warp

GodRays

Experiment with parameters in Paper (the visual editor) or check the API reference for complete parameter lists.

Dynamic Updates

Update parameters in response to user interaction:

Combining Shaders

Layer multiple shaders for complex effects:
Use CSS mix-blend-mode and opacity to blend shaders together creatively.

Responsive Parameters

Adjust parameters based on screen size:

Color Palette Tools

Generating Complementary Colors

Color Interpolation

Best Practices

Performance-Conscious Customization

1

Use static shaders when possible

Set speed={0} for backgrounds that don’t need animation.
2

Limit color count

More colors = more GPU calculations. Use 3-5 colors for best performance.
3

Reduce parameters on mobile

Lower distortion, grain, and other effects on mobile devices.
4

Test on target devices

Always test customizations on actual devices, not just desktop.

Visual Quality Tips

  • Use complementary colors (opposite on color wheel) for vibrant looks
  • Use analogous colors (adjacent on color wheel) for harmony
  • Include one darker color for depth
  • Test with different backgrounds
  • Subtle effects: 0.2-0.5 speed
  • Standard: 0.8-1.2 speed
  • Energetic: 1.5-2.5 speed
  • Match speed to your brand personality
  • Start with preset as baseline
  • Adjust one parameter at a time
  • Avoid maxing out all effects (looks noisy)
  • Less is often more

Preset Switching

Create smooth preset transitions:
CSS transitions only work on the container element, not shader parameters. For parameter transitions, use state and interpolate values over time.

Saving Custom Presets

Store and share your custom configurations:

Next Steps

Sizing & Fit

Control how shaders scale and fit containers

Performance

Optimize customized shaders for production

API Reference

Explore all shader parameters

React Usage

React-specific customization patterns