I reach for these gradients constantly in interface work because they add depth without adding a color. Below you will find exact codes, CSS for fades and overlays, ways to stop banding, contrast numbers I calculated myself, and notes for print and interiors.
What Counts as a White Gradient
A white gradient has at least one stop that reads as white and no strongly saturated stop. In practice it is a ramp of neutrals, from pure white down to light gray, or a white tinted slightly warm or cool. The effect is lighting rather than color: a surface that looks lit from one side.
Three named colors anchor the family. White () is the brightest value a screen can show. White Smoke () is a barely-there gray that lifts a card off a page. Gainsboro () is the lightest gray that still reads as clearly gray instead of off-white.
When you need more weight than Gainsboro, the gray gradient page continues the ramp into mid and dark grays.
White, White Smoke and Gainsboro: Exact Color Codes
These are the three stops used on this page, with values calculated directly from each hex code. All three are pure neutrals, so red, green and blue are always equal.
| Color | HEX | RGB | HSL | CMYK (simple) |
|---|---|---|---|---|
| White | 255, 255, 255 | 0°, 0%, 100% | 0, 0, 0, 0 | |
| White Smoke | 245, 245, 245 | 0°, 0%, 96% | 0, 0, 0, 4 | |
| Gainsboro | 220, 220, 220 | 0°, 0%, 86% | 0, 0, 0, 14 |
The CMYK column is a plain mathematical conversion. Real print values depend on the paper and the color profile, so treat it as a starting point and ask your printer for a proof.
The gaps are bigger than they look. White Smoke is only 10 levels below white, while Gainsboro is 35 levels below. That difference decides whether a gradient feels like a whisper of shading or a visible slope.
CSS for a White Gradient: Linear, Radial and Angles
The gradient studio at the top of this page lets you change stops, angle and type, then copy the CSS. These three snippets cover most real projects:
/* Soft vertical fade */
background: linear-gradient(180deg, #FFFFFF 0%, #F5F5F5 100%);
/* Three-stop diagonal */
background: linear-gradient(135deg, #FFFFFF, #F5F5F5 50%, #DCDCDC);
/* Spotlight from the upper left */
background: radial-gradient(circle at 30% 20%, #FFFFFF, #F5F5F5 45%, #DCDCDC);
Angle matters more than people expect, because it sets where the light seems to come from. Light from the upper left feels natural, so starting with white at the top left tends to look the most believable.
- 180deg runs top to bottom: best for page backgrounds, headers and card lift.
- 135deg runs from top left to bottom right: best for hero panels and buttons.
- 90deg runs left to right: good for sidebars and progress tracks.
- Radial puts a bright center on a darker edge: good for product shots and spotlights.
Put a stop position on the middle color, as in the second snippet. Without it the browser spaces stops evenly, and a white-heavy gradient often looks better when the white holds a little longer.
How to Fade an Image or Section Into White
The most common real job is blending a photo or colored banner into a white page. Lay an overlay over the bottom of the element and run it from fully transparent white to solid white:
.hero { position: relative; }
.hero::after {
content: "";
position: absolute;
inset: auto 0 0 0;
height: 40%;
background: linear-gradient(to bottom, rgba(255,255,255,0), #FFFFFF);
}
Write the transparent end as rgba(255,255,255,0), not the transparent keyword. Older Safari versions treated the keyword as transparent black, which left a gray smudge in the middle of the fade. Current browsers handle it, but the explicit version costs nothing and works everywhere.
If your page background is , end the fade on . Fading to leaves a faint bright band at the edge that is easy to miss on your own monitor.
Warm, Cool and Tinted White Gradients
Neutral whites can feel clinical. Tinting the darker stop by a few points changes the mood completely while the gradient still reads as white. Three tints I use often:
- Warm ivory: to , which feels like paper, linen and candlelight.
- Cool frost: to , which feels clean, clinical and modern.
- Blush white: to , which feels soft and slightly romantic.
Keep both ends in the same temperature. A warm start with a cool end passes through a muddy gray in the middle, and the blend looks dirty instead of luminous.

If you want to move past tinted whites into real color, the blue grey gradient and pastel green gradient are natural next steps, and the pink gradient goes further than blush.
Why White Gradients Band and How to Fix It
Screens show 256 levels per color channel. A ramp from to only has 35 steps in it. Stretched across a 1920 pixel wide screen, that is roughly 55 pixels per step, and on some displays you can see faint stripes. A gradient from to has just 10 steps, so each band could be close to 190 pixels wide.
How many 8-bit steps separate #FFFFFF from #DCDCDC?
255 minus 220 leaves 35 steps, so a wide, shallow gradient has few levels to spread across the screen.
Banding is worst on large, shallow gradients, which is exactly what white gradients are. Four fixes work reliably:
- Widen the range, for example by ending on instead of .
- Add a faint tint to one stop so the channels step at different points.
- Overlay a subtle noise texture at low opacity to break up the edges.
- Use a radial gradient, which spreads steps across a curve instead of a straight line.
Contrast and Accessibility on a White Gradient
A background gradient does not need to pass contrast on its own. The text on top of it does, so always test against the darkest stop under that text. I calculated the WCAG ratios: white against is 1.09:1, and white against is 1.37:1. The whole gradient spans a very gentle range.
Dark text #36393E sits on the darkest end, #DCDCDC. Does it pass WCAG AA for body text?
The ratio is roughly 8.4:1, well above the 4.5:1 AA threshold for normal text.
Dark text handles it comfortably. Charcoal such as #36393E measures about 11.6:1 on , 10.6:1 on and 8.4:1 on , all above the 4.5:1 AA level and the 7:1 AAA level for body text.

Mid-gray text is the trap. just passes on white at 4.54:1, but it falls to about 4.17:1 on and 3.31:1 on . I once fixed a client dashboard where placeholder text passed on white cards but failed on the page gradient behind them. Darkening that one gray fixed it.
Also remember that interface boundaries need 3:1 against their surroundings under WCAG 1.4.11. An input field outlined only by a shade of white on white is far below that, so give fields a real border.
White Gradients in Web and App Design
In UI, white gradients do quiet jobs. A card that moves from to top to bottom gains subtle lift. A page that shifts from white to separates content areas without a hard line. Skeleton loaders use the same idea, sliding a white highlight across a gray base:
.skeleton {
background: linear-gradient(90deg, #F5F5F5 25%, #FFFFFF 50%, #F5F5F5 75%);
background-size: 200% 100%;
}
On dark themes the idea flips. You use translucent white over near-black to create a glow, and the black gradient page shows how those dark surfaces are built. Do not simply invert a light theme: the same white stops that look gentle on light backgrounds look harsh on dark ones.
Try this: Take a flat card on a page and give the card
linear-gradient(180deg, #FFFFFF, #F5F5F5). Squint at it. If the card edge disappears, end the gradient on instead.
White Gradients in Print, Interiors and Fashion
In print, paper is your white. A gradient to white is really a tint fading to zero ink, so the very lightest tints can drop out on press. I once approved an on-screen footer fade from to white, and the proof showed the fade ending abruptly with a visible edge. Start print fades at a stronger tint, or let the gradient reach paper white more slowly.
Interiors use the same logic with light. An ombre wall from white into pale gray makes a room feel taller when the lighter tone sits at the top. Fabric and fashion use it as dip-dye or ombre, where white fades into gray or a pale tint. Digital artists use white gradients for mist, glow and soft studio backdrops.
Palettes to Pair With a White Gradient
White gradients work best when something else carries the contrast. A single dark anchor such as charcoal handles text, and one accent handles emphasis. For a darker neutral step, the black to grey gradient pairs naturally with a white one.
Portfolio sites and dashboards that need calm neutrals with one dark anchor.
Interiors, stationery and lifestyle brands that want a softer, natural feel.
SaaS landing pages, health apps and clean tech interfaces with a cool tone.
Beauty, wedding and boutique designs that need gentle warmth around white.
For luxury and premium styling, a restrained gold gradient against looks warm and expensive without needing much else. Here are four ready-made palettes built around white gradients.
The colors behind these gradients
White Gradient: questions people ask
What is the hex code for a white gradient?
There is no single code, because a gradient needs at least two stops. The most common white ramp uses #FFFFFF, #F5F5F5 and #DCDCDC, which you can write as linear-gradient(180deg, #FFFFFF, #F5F5F5, #DCDCDC).
How do I make a white gradient in CSS?
Use the background property with linear-gradient or radial-gradient and list your white and gray stops, for example background: linear-gradient(135deg, #FFFFFF, #DCDCDC). Add an angle or position to control where the light seems to come from.
What is the difference between white and white smoke?
White is #FFFFFF, with every channel at 255. White Smoke is #F5F5F5, with every channel at 245, so it is about 4% darker and reads as a very soft gray beside pure white.
How do I fade an image to white in CSS?
Place an overlay on top of the image with background: linear-gradient(to bottom, rgba(255,255,255,0), #FFFFFF). Using rgba(255,255,255,0) instead of the transparent keyword avoids gray fringes in older browsers.
Can a white gradient hurt readability?
Only if your text is mid-gray. Dark text such as #36393E stays above 8:1 on every stop from #FFFFFF to #DCDCDC, but gray text near #767676 drops below 4.5:1 on the darker stops.
Keep exploring
- Brown Gradient: Dark Brown Gradient Colors, Hex Codes and CSS
- Rainbow Gradient: Colors, Backgrounds and CSS Codes
- Green Gradient: Color Combinations, Hex Codes and CSS
- Bronze Gradient: Wallpaper Colors, Hex Codes and CSS
- Blue Gradient: Colors, Hex Codes and CSS Backgrounds
- Cyan Gradient: Light Cyan Backgrounds and CSS Codes
- Honey Blonde Color: Hex Code, RGB and Palettes
- Light Green Color: Hex Code, RGB and Palettes