# OKLCH Gradient

> A gradient interpolated in OKLCH so the middle stays bright and saturated instead of going gray.

- Category: [CSS Gradients & Patterns](https://copy-css.com/category/gradients)
- Tags: color space, interpolation, vivid, no gray, modern
- Live preview: https://copy-css.com/snippets/oklch-gradient
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<div class="gradient-oklch"></div>
```

## CSS

```css
.gradient-oklch {
  /* Fallback for older browsers */
  background: linear-gradient(90deg, #ec4899, #06b6d4);
  /* Mixing in OKLCH avoids the muddy middle of sRGB gradients */
  background: linear-gradient(90deg in oklch, #ec4899, #06b6d4);
}
```

## Notes

- This CSS OKLCH Gradient is 6 lines of pure CSS (0.2 KB) with no JavaScript and no dependencies. It uses linear gradients.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
