On this page
Use the studio above to move the stops, change the angle or switch to radial and conic, then copy the result. The sections below cover the exact color codes, the traps that make purple fades look muddy, contrast ratios, print behavior and where this gradient works best.
The Three Purples Behind This Gradient
Lavender is a pale, cool tint with a faint blue lean (hue around 269 degrees). Purple sits in the middle and is a little warmer and redder (hue around 282). Deep purple returns to almost the same hue as the lavender, only far darker and more saturated.
That shared hue is why this gradient looks clean. The three stops read as one color in light, midtone and shadow, not as three separate colors fighting each other.
Purple is a crowded family, so it helps to know what this trio is not:
- CSS purple is pure and pinker (hue 300), flatter and more dated on screen.
- Indigo is bluer and darker, with a hue near 275.
- Plum is dustier and redder than our mid stop.
- CSS violet is light and distinctly pink.
- Magenta is a different color altogether, hot and electric.
Hex, RGB, HSL and CMYK Codes for Each Stop
Here are the values for all three stops, computed straight from the hex codes. The CMYK figures use the plain mathematical conversion, so treat them as a starting point, not a press-ready recipe.
| Stop | HEX | RGB | HSL | CMYK |
|---|---|---|---|---|
| Lavender | 216, 180, 254 | 269°, 97%, 85% | 15, 29, 0, 0 | |
| Purple | 142, 68, 173 | 282°, 44%, 47% | 18, 61, 0, 32 | |
| Deep purple | 59, 10, 107 | 270°, 83%, 23% | 45, 91, 0, 58 |
HSL is the most useful format when you tweak a gradient by hand. Keep the hue between 265 and 285 and move only lightness, and the result stays recognizably the same purple. Drift the hue too far and you get blue-violet at one end and magenta at the other.
Copy-Ready CSS for a Purple Gradient
The three-stop version is the one most pages need. Put a solid color above it so older browsers still show something sensible:
.hero {
background-color: #8E44AD;
background: linear-gradient(135deg, #D8B4FE 0%, #8E44AD 50%, #3B0A6B 100%);
}
Modern browsers also let you choose the color space the blend happens in. Interpolating in oklch keeps lightness changes even and avoids dull patches:
.hero-smooth {
background: linear-gradient(in oklch 135deg, #D8B4FE, #3B0A6B);
}
For a reusable setup, store the stops as custom properties, such as --purple-light, --purple-mid and --purple-deep. Then every hero, card and button pulls from one source, and a brand refresh means editing three lines.
Why Some Purple Gradients Turn Muddy in the Middle
Browsers blend colors by averaging their channels. For lavender to deep purple, the average of the two ends is about , which is still a healthy purple, so this gradient is safe. Trouble starts when you blend purple with a far-away hue such as orange, yellow or green. The average lands near grey, and you see a dull band across the middle.
Your purple to orange gradient goes grey halfway across. What is the best quick fix?
A saturated middle stop replaces the grey average the browser would otherwise create between opposite hues.
I ran into this on a fintech onboarding screen where the client wanted purple into orange. Moving the blend into oklch and adding one magenta stop removed the grey band without touching the end colors.
If the halfway color of your gradient looks grey in the studio, add a stop there with real saturation. Do not let the browser average two distant hues.

Banding is the other common flaw. Large, dark purple areas can show faint stripes because screens have only 256 steps per channel. A very light noise texture over the top hides it, and the same trick helps any dark fade, including a black to grey gradient.
Linear, Radial or Conic: Which Suits Purple?
Linear at 135 degrees is the safe default. It runs corner to corner, so the light end sits top left and the deep end bottom right, which mimics a light source and feels natural. Use 180 degrees for full-page backgrounds, where the light fades down into the content, and 90 degrees for buttons and progress bars.
Radial gradients put a soft glow behind something. A lavender center fading into deep purple works well behind a product shot or a phone mockup. Conic gradients sweep around a point, so they suit rings, loaders and avatar borders, and the purple trio handles that well because it loops cleanly when you repeat the first stop at the end.
- Linear: hero sections, cards, page backgrounds, buttons.
- Radial: spotlights, glows, vignettes behind objects.
- Conic: rings, charts, loading spinners, color wheels.
Text Contrast on Purple: WCAG Ratios Worked Out
Purple gradients are lovely and surprisingly easy to get wrong for readers. I computed the WCAG ratios for the three stops, and they split cleanly. White text on deep purple is about 14.6:1, and white on mid purple is about 5.9:1. Both clear the 4.5:1 AA threshold for normal text.
Which text color is the safest choice on the lavender end, #D8B4FE?
Deep purple reaches about 8.2:1 on lavender, while white manages only about 1.8:1.
The lavender end is the problem. White on is only about 1.8:1, while deep purple text on it reaches about 8.2:1 and black reaches about 11.9:1. Black on the mid stop is just 3.6:1, so dark text there only works at large sizes (3:1 minimum).

I once fixed a client’s pill buttons that had white labels over a lavender fade, a pairing that failed at 1.8:1. Switching the labels to solved it with no change to the look. When text crosses a gradient, test the lightest and darkest points beneath the words, not just the average.
Using a Purple Gradient in UI and Branding
In interfaces, purple gradients work best as a large, quiet surface with small, confident accents. Put headlines and body copy on the dark end, and keep the lavender end for decoration or glow. A button can use the mid-to-deep pair at 135 degrees with white text and still pass contrast.
For gradient text, apply the fade to the letters themselves, and only at display sizes:
.headline {
background: linear-gradient(90deg, #8E44AD, #D8B4FE);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
Dark mode is where deep purple shines. Instead of pure black, use fading toward a near-black purple like , which feels richer and keeps edges softer. If you want something starker, compare it with a pink to black gradient. For brands, pick one hero gradient, name its stops, and reuse it everywhere, because a purple that changes from page to page stops looking like an identity.
Try this: Place white text over your gradient at three spots: the lightest, the middle and the darkest. Check each against 4.5:1 and move the text, or the stop, until all three pass.
What Happens to Purple Gradients in Print
Screens emit light, and paper reflects it, so purple always shifts in print. Deep saturated purples sit near the edge of what CMYK can reproduce. The naive conversion of is 45, 91, 0, 58, but a real press will land a little duller or bluer depending on stock and ink.
A print proof once surprised me: the deep end of a purple fade merged with a black text block, and the last third of the gradient simply vanished into it. I fixed it by lifting the deep stop slightly and leaving a gap before the black.
Always request a proof for gradients. Keep the fade long, since short ramps show visible steps, and avoid putting fine text on the transition. If brand purple matters, discuss a spot ink with your printer, because a spot color holds its tone better than four-color mixing.
Purple Gradients for Interiors, Fashion and Art
On walls, an ombré from lavender at ceiling height to a deeper plum near the floor makes a room feel taller and calmer. Most people try it on a single feature wall first, and paint it by blending wet coats. A soft lavender like works as a wall color only in strong daylight, otherwise it reads greyer.
In fashion, purple fades appear as dip-dye hems, tie-dye and satin ombré, where deep purple at the hem and lavender at the shoulder looks deliberate and soft. Hair color works the same way, with a dark root melting into lilac.
Artists get purple gradients almost for free with wet-on-wet watercolor. Lay lavender and a mid purple side by side on damp paper and let them meet. For digital art, a gradient map from deep purple to lavender is a quick way to unify a scene’s shadows and highlights.
Purple Gradient Palettes to Copy
These four palettes take the lavender, purple and deep purple trio and add supporting colors for different moods. Each has five codes, so you can drop them straight into a design tool or a CSS file.
Calm landing pages, wellness brands and soft app backgrounds with dark text.
Bold hero banners, launch posters and social graphics with white type.
Music, gaming and night-mode interfaces that need a warm accent color.
Editorial layouts, packaging and interiors where purple should feel restrained.
Start with the one closest to your project’s mood, then use the gradient studio to pick which two or three colors become your stops. The remaining colors do the quiet work of text, borders and accents.
Colors That Pair Well With Purple Gradients
Pink is the closest neighbor. Warm the mid stop toward magenta and you land in sunset territory, which our pink to purple gradient page explores in depth. Blue pulls the other way: an indigo start cools everything down, and pairing pale lavender with sky tones gives the soft look in the light blue and light purple combination.
Neutrals calm purple quickly. A dusty grey beside it feels grown-up and modern, as shown in the purple and grey color scheme. For a cooler, fresher contrast, a teal gradient next to deep purple feels crisp, and a hint of mint gradient green lifts lavender without fighting it.
For a small hit of energy, add warm yellow such as in a button or a highlight line. It sits opposite purple on the color wheel, so a little goes a long way.
The colors behind these gradients
Purple Gradient: questions people ask
What is the hex code for a purple gradient?
There is no single code, because a gradient needs at least two stops. A reliable trio is lavender #D8B4FE, purple #8E44AD and deep purple #3B0A6B, blended at 135 degrees.
How do I make a purple gradient in CSS?
Use background: linear-gradient(135deg, #D8B4FE, #8E44AD, #3B0A6B); on any element. Add a plain background-color line above it as a fallback, and try the in oklch option for smoother blends.
What colors go well with a purple gradient?
Pink and blue are the natural neighbors, teal gives a cool contrast, and a small touch of warm yellow works as an accent. Neutral greys and near-white keep it calm.
Is white text readable on a purple gradient?
On the mid and deep stops, yes. White on #8E44AD is about 5.9:1 and on #3B0A6B about 14.6:1, but on lavender #D8B4FE it drops to about 1.8:1, so use dark text there.
Why does my purple gradient look grey or banded?
Grey usually appears when you blend purple with a distant hue like orange or green, so add a saturated middle stop. Banding shows on large dark areas, and a very light noise overlay hides it.
Keep exploring
- Brown Gradient: Dark Brown Gradient Colors, Hex Codes and CSS
- Pastel Green Gradient: Backgrounds, Wallpapers and CSS Codes
- Black Gradient: Dark Theme Gradients with CSS Codes
- Rainbow Gradient: Colors, Backgrounds and CSS Codes
- Green Gradient: Color Combinations, Hex Codes and CSS
- Bronze Gradient: Wallpaper Colors, Hex Codes and CSS
- Honey Blonde Color: Hex Code, RGB and Palettes
- Light Green Color: Hex Code, RGB and Palettes