This midnight to gold linear gradient is an editable CSS color system generated with OKLCH-aware perceptual interpolation, multi-stop fallback compilation, and Tailwind CSS utility export. It preserves chroma during transitions, reducing muddy gray midpoints while giving developers production-ready CSS and designers precise visual control.

Editable gradient preset

midnight to gold linear CSS gradient

Edit this gradient in the studio, copy production CSS, compare accessibility, and explore related color combinations generated from the same seed colors.

#402a6c#e6bf50

Gradient guide

How to use this midnight to gold gradient

This linear gradient can be used as a hero background, dashboard card treatment, app shell backdrop, social visual, or landing page accent. The color sequence is parsed directly from the URL, which means the preset can be shared, edited, and revisited later.

The export system creates a standard CSS fallback, a perceptual multi-stop fallback, and a modern OKLCH declaration where appropriate. That makes the output useful for production interfaces, not just screenshots or static inspiration boards.

Use the related-gradient matrix below to explore adjacent hues, lightness shifts, and palette variations. Each suggestion is generated deterministically so the same colours always return the same related ideas.

Interactive editor

Edit this gradient

Physics Preview Workspace

Perceptual CSS gradients without muddy midpoints.

Build layered linear, radial, conic, and mesh gradients using OKLCH, LAB, HCL, easing curves, blend modes, and fallback compilers.

White text

6.83:1

WCAG AA friendly

Black text

6.85:1

WCAG AA friendly

Export ready

CSS

Fallbacks · Tailwind · SVG

Pre-rendered CSS output

.css-gradient-pro-gradient {
  background: linear-gradient(135deg, #402a6c 0%, #e6bf50 100%);
  background: linear-gradient(135deg, #402a6c 0%, #442b6e 9.1%, #522e72 18.2%, #693376 27.3%, #893c76 36.4%, #ad4a6d 45.5%, #cc605b 54.5%, #df7d49 63.6%, #e79941 72.7%, #e8ae45 81.8%, #e7bb4d 90.9%, #e6bf50 100%);
  background: linear-gradient(135deg in oklch, oklch(34.83% 0.1102 295.47) 0%, oklch(81.85% 0.1350 89.59) 100%);
  background-blend-mode: normal;
}

Full-width inspiration gallery

120 mathematically tuned gradient collections.

Browse ready-made colour systems, preview them instantly, and open any preset as a full editable gradient when you need more control.