Palette maker

Black to Grey Gradient: Colors, Hex Codes and CSS

A black to grey gradient runs from pure black through dark grey to mid grey . The CSS is linear-gradient(135deg, #000000, #555555, #808080).

Type
135°
 

More black to grey gradients to try

On this page
  1. The stops
  2. Color codes
  3. CSS code
  4. Banding fixes
  5. Direction
  6. Tinting
  7. Contrast
  8. Web and UI
  9. Other uses
  10. Printing
  11. Palettes
  12. FAQ

It looks like the easiest gradient there is, which is exactly why it trips people up. Neutral fades band visibly, change character depending on where the midpoint sits, and can quietly break text contrast. This page gives you exact values, working code and the fixes I reach for on real projects.

Black, Dark Grey and Grey: What Each Stop Does

Black is the anchor. is the darkest value a screen can show, so it gives the gradient weight and depth. Dark grey is the bridge: it stops the fade from jumping straight to a light grey and gives the middle a charcoal tone. Grey is the HTML and CSS value for grey, almost exactly halfway up the 0 to 255 scale.

Close cousins behave differently. Black to white covers the full range and feels harsher. Black to charcoal, ending near , stays dense and moody (the charcoal hex page shows what pairs with it). CSS also has named greys, and they are not in the order you would guess:

  • gray or grey:
  • dimgray or dimgrey:
  • darkgray or darkgrey:
  • lightgray or lightgrey:

So darkgray is lighter than gray, a classic gotcha. Hex codes remove the confusion.

HEX, RGB, HSL and CMYK Values for Each Stop

Every stop here is a true neutral: red, green and blue are equal, so hue and saturation are zero and only lightness changes. That makes the values easy to read and easy to nudge by hand.

Stop HEX RGB HSL CMYK (K only)
Black 0, 0, 0 0, 0%, 0% 0, 0, 0, 100
Black to dark grey midpoint 43, 43, 43 0, 0%, 17% 0, 0, 0, 83
Dark grey 85, 85, 85 0, 0%, 33% 0, 0, 0, 67
Dark grey to grey midpoint 107, 107, 107 0, 0%, 42% 0, 0, 0, 58
Grey 128, 128, 128 0, 0%, 50% 0, 0, 0, 50

The CMYK column is the simple K-only conversion, which is the right way to build neutral greys for print. Your printer’s profile will change the final ink numbers, so treat these as a starting recipe rather than a guarantee.

Two panels compare black, dark grey and grey as screen HEX and RGB values versus print K-only CMYK values
Each grey stop is equal RGB on screen and pure black ink, K100 to K50, in print.

The CSS for a Black to Grey Gradient

The gradient studio above lets you move stops and switch type, but the finished code is short enough to write by hand. Here is the three-stop version with a solid fallback first:

.hero {
  background: #555555;
  background: linear-gradient(135deg, #000000 0%, #555555 50%, #808080 100%);
}

Stop positions matter more than most people expect. Pushing to 30% shortens the black and gives the grey the larger share. The cleanest two-stop fade is linear-gradient(90deg, #000000, #808080), and the HSL version, linear-gradient(90deg, hsl(0 0% 0%), hsl(0 0% 50%)), is easy to adjust by changing one number.

Why Neutral Gradients Band and How to Smooth Them

A fade from to has only 128 distinct steps, because a grey has one channel value per level. Stretched across a 1920 pixel wide hero, each step is about 15 pixels wide, and the eye picks out the edges as stripes. Short ranges are worse: to has just 26 steps.

Your black to grey hero shows visible stripes. Which fix helps most?

Noise breaks up the hard edges between the limited grey steps, so the eye reads a smooth blend.

Three fixes that work:

  • Lay a faint noise texture over the gradient at roughly 3 to 5% opacity.
  • Add a whisper of tint so red, green and blue step at different points, for example into .
  • Keep the range wide, or the area small, instead of fading two near-blacks across a full screen.

Interpolation space changes the feel too. Browsers blend in sRGB by default, so the midpoint of black and is . Ask for Oklab and the midpoint is about , so black holds a little longer and the step is closer to what the eye reads as halfway:

background: linear-gradient(90deg, #000000, #808080);
background: linear-gradient(in oklab 90deg, #000000, #808080);

Browsers that do not understand the second line simply keep the first.

Linear, Radial or Conic: Choosing the Direction

Linear

Linear is the default and suits headers, cards and buttons. At 180deg the fade runs top to bottom, and I like grey on top and black below because light seems to fall from above. A 135deg diagonal feels more designed and hides banding slightly better than a pure horizontal.

background: linear-gradient(180deg, #808080, #000000);

Radial and conic

A radial gradient makes a spotlight: put near the center and let black take the edges to pull the eye inward. Conic gradients sweep around a point, and alternating black and grey gives a convincing brushed metal look on round buttons and dials.

background: radial-gradient(circle at 30% 20%, #555555, #000000 70%);
background: conic-gradient(from 45deg, #808080, #000000, #555555, #000000, #808080);

Warm, Cool or Neutral: Tinting the Grey

Pure neutrals can look flat, or slightly dead, beside colorful content. A small tint fixes that. A cool, blue-leaning fade such as into feels technical and calm, and the blue grey gradient page goes deeper on that direction. A warm fade from through to feels paper-like and suits editorial work and packaging.

If the tint grows into a color story, it may belong to another family. A red-leaning black has its own page in red to black, and a violet near-black lives in the black purple gradient. For lighter, airier fades that never touch black, see the gray gradient backgrounds.

Text Contrast on Black and Grey Backgrounds

Contrast changes along the gradient, so check the worst point, not the average. I calculated the WCAG ratios for white text: 21:1 on , about 7.5:1 on and about 3.95:1 on . Black text does the opposite, reaching about 5.3:1 on but only about 2.8:1 on .

White body text sits on the #808080 end of the gradient. Does it pass WCAG AA?

White on #808080 gives roughly 3.95:1, which only passes for large text at 3:1.

White body text on the light end of this gradient therefore fails AA, which asks for 4.5:1, though large text only needs 3:1. On one client pricing page, white labels sat over a fade ending at . We moved the end stop to , which gives white about 5.3:1, and the design barely changed.

The 4.5:1 cut-off

White text passes AA on any grey up to . Black text starts passing from about , so mid grey is where both work but neither feels comfortable.

Four Aa text tiles on dark grey and mid grey showing WCAG contrast ratios with AA pass or fail
White text passes on #555555 but fails on #808080, while black text does the reverse.

Using Black to Grey in Web and UI Design

Full-width hero backgrounds are the obvious use: black to behind a white headline looks sharp and keeps contrast high. For cards and panels, a subtle fade between two close dark greys adds depth without pulling attention from content. Photo overlays are the quiet workhorse, since a black to transparent scrim keeps text readable over any image:

.hero::after {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
}

Dark mode needs care. Large areas of pure black can feel harsh and make light text seem to glow, so many interfaces use a near-black like for surfaces and keep true black for accents and deep shadows. The pure black page covers where earns its place.

Try this: Place your headline over the gradient at three spots: the dark end, the middle and the light end. Check each against 4.5:1, then darken the light stop until all three pass.

Branding, Interiors, Fashion and Art Ideas

In branding, a black to grey fade signals seriousness and precision, which is why it shows up around audio gear, watches, cars and financial tools. Use it for a logo shine or a packaging panel, and give it a partner color so it does not feel generic. Navy is the safest companion, and the navy and grey combinations show how it plays out.

Interiors lean on the same idea through ombré feature walls and lighting. Grey shifts a lot with light direction, so test a patch on the wall at morning and evening before committing. In fashion, dip-dyed knitwear and charcoal to heather fades are easy to wear, and grey has a long tailoring history: the grey business suit appeared in mid-19th century London.

For art, a black to grey scale is the backbone of tonal work. Painters have long used grey for underpainting, and grey was frequently used for drawing oil paintings. A hand-shaded graphite value strip is simply a black to grey gradient made with a pencil.

Printing a Black to Grey Fade Without Surprises

Screens make black and grey with light, while print makes them with ink. Keep the whole fade in the K channel: roughly K100 for , K67 for and K50 for . Mixing cyan, magenta and yellow into a grey invites a color cast whenever the press drifts.

A proof once surprised me. A K100 to K50 fade I had approved on screen printed darker overall on uncoated paper, because ink spreads as it soaks in, and faint banding appeared in the middle. We lightened the grey end and added a fine texture, and the next proof was far closer. Always ask for a printed proof of any gradient before the full run.

Palettes to Pair With Black and Grey

A black to grey gradient works best as a quiet base with one job: giving depth. Keep the rest of the palette small, with a light neutral for text and surfaces and, if you want energy, a single accent used sparingly.

Graphite Studio

Dashboards, portfolios and product pages that need quiet, neutral depth.

Steel Night

Tech landing pages and dark mode apps with a cool, engineered feel.

Warm Ash

Editorial layouts, interiors and packaging that want softer, lived-in neutrals.

Signal Accent

Sale banners and calls to action where one bright accent must stand out.

The palettes below cover a neutral studio set, a cool steel set, a warm ash set and one with a bright orange accent. Copy the hex codes straight into your CSS variables, and run the contrast check on any text pairing before you ship.

The colors behind these gradients

Black to Grey Gradient: questions people ask

What is the hex code for a black to grey gradient?

The usual stops are black #000000, dark grey #555555 and grey #808080. Many designers also end the fade on charcoal #333333 for a deeper, moodier result.

How do I make a black to grey gradient in CSS?

Use background: linear-gradient(135deg, #000000, #555555, #808080); and add a solid color line above it as a fallback. Change the angle or the stop percentages to shift where the grey takes over.

Is it grey or gray in CSS?

Both spellings work: gray and grey are the same keyword, #808080. Watch out for darkgray, which is #A9A9A9 and is actually lighter than gray.

Why does my black to grey gradient look striped?

Neutral greys have only one channel value per step, so a wide gradient shows visible bands. Add a faint noise overlay, tint the greys slightly or widen the color range to hide them.

Can I put white text on a black to grey gradient?

Yes, as long as the text sits on greys no lighter than about #767676, where white still reaches 4.5:1 contrast. On a gradient that ends at #808080, keep body text away from the light end or darken that stop.

Keep exploring