VisualNov 2024

Gradient Mesh Generator

Interactive tool for creating organic, mesh-style gradient backgrounds

Tools

Canvas API, OKLCH, React

Type

Visual

Gradient Mesh Generator

Concept

A browser-based tool for generating mesh gradients similar to those in Figma or design tools, but with real-time manipulation and export options.

Process

Uses HTML Canvas with Bezier curves and color interpolation algorithms. Control points are draggable, and colors blend using perceptually uniform color spaces (OKLCH).

Gallery

Gradient Mesh Generator - Image 1
Gradient Mesh Generator - Image 2

Learnings

  • OKLCH produces more pleasing gradients than RGB interpolation
  • Canvas performance is excellent even with complex mesh calculations
  • Export to CSS is limited; SVG filter approach works better for web use