An animated, customizable gradient hero background built with HTML5 Canvas. Features real-time controls for colors, effects, SVG patterns, and blend modes.
- 🎨 Animated Canvas Gradients - Smooth, fluid gradient animations with customizable colors and movement
- 🎛️ Real-time Controls - Extensive control panel for live customization
- 🎭 Blend Modes - Multiple CSS blend modes (multiply, screen, overlay, soft-light, etc.)
- 🖼️ SVG Pattern Overlays - 14+ pattern types (grid, dots, lines, hexagon, waves, mesh, etc.)
- 🎨 Color Customization - Hue range or custom palette modes
- ⚡ Performance Optimized - Smooth 60fps animations with efficient canvas rendering
- 📱 Responsive - Works on all screen sizes
- 💾 Export Functionality - Export your custom animations
- Clone the repository:
git clone https://github.com/exzenter/gradientHero.git-
Open
index.htmlin your web browser -
Click the control panel button (top-right) to customize the gradient
- Gradient Opacity - Control overall transparency
- Blur - Apply blur effects to gradients
- Brightness, Contrast, Saturation - Fine-tune appearance
- Hue Rotation - Shift color hues
- Gradient Scale - Adjust gradient size
- Center Position - Control X/Y positioning
- Mix Blend Mode - Choose from 12+ blend modes
- Gradient Count - Number of animated gradients (2-10)
- Animation Speed - Control animation velocity
- Gradient Color Fade - Adjust fade point in gradients
- Hue Range Mode - Auto-generate colors from hue range
- Custom Palette Mode - Use your own color palette
- Saturation & Lightness - Fine-tune color properties
- 14+ Pattern Types - Grid, dots, lines, hexagon, waves, mesh, circuit, and more
- Opacity & Size - Customize pattern appearance
- Stroke Width - Adjust pattern line thickness
- Pattern Color - Choose overlay color
- Blend Modes - Apply blend modes to patterns
- Background Color - Set base background color
- Gradient Overlay - Optional gradient overlay with angle control
Simply include the files in your project and customize the hero content in index.html:
<main class="hero-content">
<h1>Your Hero Title</h1>
<!-- Your content here -->
</main>The gradient animation will automatically fill the viewport behind your content.
index.html- Main HTML structurecanvas-animation.js- Core gradient animation enginecontrols.js- Control panel functionalitystyles.css- Styling and layoutsvg-patterns.js- SVG pattern generation
Works in all modern browsers that support:
- HTML5 Canvas
- CSS Blend Modes
- ES6 JavaScript
MIT License
Mitch
Made with ❤️ for beautiful web experiences