On this page
The strip above shows both codes with a live preview as background, text and button, plus a contrast score. Below you will find the exact values, how to build a full scale around the pair, and how it behaves in UI, branding, interiors, fashion and print.
Black and grey hex codes, RGB, HSL and CMYK
Black sits at the bottom of every screen scale, and lands almost exactly halfway on the 0 to 255 numeric range. Neither has hue or saturation, so the only thing that changes between them is lightness.
| Color | HEX | RGB | HSL | CMYK |
|---|---|---|---|---|
| Black | 0, 0, 0 | 0°, 0%, 0% | 0, 0, 0, 100 | |
| Grey | 128, 128, 128 | 0°, 0%, 50% | 0, 0, 0, 50 |
The CMYK figures are plain conversions from RGB, so treat them as a starting point, because a printer’s profile will shift them. In CSS you can write gray or grey, and both mean . One trap: the keyword darkgray is , which is lighter than gray, not darker.
Which CSS color name equals #808080?
The keyword gray is #808080, while darkgray is actually lighter (#A9A9A9) and dimgray is darker (#696969).
How black and grey behave side by side
Black is the end of the scale, so grey needs company. A strict two-color pair goes flat quickly, which is why working palettes add three to five steps between black and a light grey.
On the CIE lightness scale, comes out near 54 out of 100, a touch lighter than its 50% HSL value suggests. In practice that means it separates cleanly from black but is not bright enough to carry text on its own. These nearby named greys are worth knowing:
- Charcoal : a blue-leaning dark grey that feels softer than black.
- Dim gray : darker than , useful for secondary text on white.
- Silver : light and slightly metallic in large areas.
- Light gray : the usual tone for borders and dividers.
- : a common near-black for body text on white.
For a complete ramp from black to white with codes at every step, see the grayscale color palette.
Warm grey or cool grey with black?
A pure is rare in finished designs. Most real greys lean one way, and because black stays neutral, the grey’s undertone decides the mood. Cool greys such as carry a little blue and feel technical and clean. Warm greys such as carry a little brown and feel soft and tactile.
Pick one undertone per project. A blue-grey beside a brown-grey looks like a mistake rather than a choice, especially on screens where the two sit side by side in a card. If you are unsure, hold a white sheet of paper against your swatch and see which way the grey leans.
Choose cool greys for software and hardware, warm greys for homes, food and fashion, and keep black as the neutral anchor in both.
Ready-to-use black and grey palettes
The palettes below are built as controlled ramps rather than random picks. Each has a dark anchor, two or three mid steps and a light step, so text, surfaces and borders all have somewhere to go.
Dark dashboards, portfolios and photography sites with calm hierarchy.
Cool, technical look for SaaS, dev tools and data interfaces.
Living rooms, packaging and menswear with wood, leather or linen.
Brand kits and landing pages where one amber accent carries buttons.
Graphite Studio and Slate and Ink suit screens. Warm Charcoal is better for rooms, packaging and apparel. One Spark keeps the pure pair and adds a single amber accent for buttons and links.
Is black and grey accessible? The contrast numbers
WCAG AA asks for 4.5:1 for normal text and 3:1 for large text and interface components. Black against scores 5.32:1 in either direction, so it passes for body text. White on reaches only 3.95:1. These are the ratios worth remembering:
- on : 5.32:1, passes AA
- on : 3.95:1, large text and icons only
- on : 4.41:1, just misses AA
- on : 7.37:1, passes AAA
- on white: 4.54:1, the lightest grey that passes AA on a white page
The near miss on is the one that catches teams out. I once fixed a dark dashboard where grey captions looked fine on my monitor and failed the audit; moving them from to solved it without changing the feel.
Try this: Set as text on in the preview, note the score, then lighten the grey one step at a time until it clears 4.5:1.
Which pairing passes WCAG AA for normal body text?
Grey on pure black scores 5.32:1, while the other two come in at 4.41:1 and 3.95:1.
Using black and grey in web and UI design
Pure backgrounds can make white text feel harsh, so many dark themes start from or instead. Keep true black for OLED hero sections, full-bleed video or places where you want the screen edge to disappear. Build everything else from a small set of tokens:

:root {
--ink: #0D0D0D;
--grey-900: #1A1A1A;
--grey-700: #333333;
--grey-500: #808080;
--grey-300: #CCCCCC;
--grey-100: #F2F2F2;
}
.button { background: var(--grey-100); color: var(--ink); }
.muted { color: var(--grey-500); }
Use three text levels at most: primary, secondary and muted. Grey also works well for hairline borders and disabled states, because it reads as quiet without needing a new hue. For a dark theme with a hint of color, the deep blues in the night sky color palette tint these greys nicely.
Black and grey in branding and logos
Black and grey reads as serious, premium and technical, which is why it shows up so often in hardware, automotive, architecture and photography brands. It also survives every medium: a logo in black, a reversed version in white and a grey secondary mark cover nearly all uses.
The risk is blandness. Mid grey as the only brand color has no energy, and a grey logo vanishes over grey photography. When a studio client asked me for “just black and grey”, the identity only took hold once we added one signal color for links and buttons. Plan that accent from day one.
Black and grey interiors: ratios, texture and light
A dependable split for a room is about 60 percent light or mid grey on walls and large pieces, 30 percent darker grey on sofas, rugs and curtains, and 10 percent black on frames, lamps and hardware. Black in small doses draws edges and makes the greys look intentional.
An all-grey room can feel cold, and texture fixes that. Mix matte and gloss, linen and wool, and add warm bulbs and plants. Wood is the classic softener, and the brown and black page shows how that pairing works. In small rooms, let the lighter greys lead and keep black for definition.
Fashion, photography and art with black and grey
In clothing, a grey marl sweater over black trousers or a charcoal coat over black knitwear is almost impossible to get wrong. The only trap is near matches: a dark grey that is almost black looks like a faded wash, so go clearly different or fully tonal with varied fabrics.

Black and white photographs are mostly greys, and graphite and charcoal drawing live in the same range. Photographers’ 18 percent grey card sits close to in sRGB, a handy reference when you are checking exposure or screen calibration. In painting, a mid-grey ground makes both darks and lights easier to judge.
Printing black and grey without surprises
A print proof once surprised me: a grey that looked neutral on screen came back with a green cast on uncoated stock, because I had converted it from RGB without checking the build. For neutral greys in print, use pure black ink tints, so becomes roughly 50% K, rather than mixing all four inks.
Large solid black areas look richer with a little color underneath. A common rich black is around 60 cyan, 40 magenta, 40 yellow and 100 black, but ink limits differ by printer, so ask yours. Keep small text and thin lines in 100% K only, since extra inks can blur if the plates drift.
Accent colors that lift black and grey
Red is the classic partner and gives the pair real urgency, as in the red, white and black scheme. Purple adds richness: black and purple feels dramatic, while purple and grey is softer and more everyday.
A cool metallic blue shines against charcoal, and amber stands out against almost any grey. Keep the accent near 10 percent of the design, repeat it in the same role everywhere, and let black and grey carry the rest.
Shades that keep this combination working
Black and Grey Color Combination: questions people ask
What are the hex codes for black and grey?
Black is #000000 and standard mid grey is #808080, which is also the CSS color named gray. For a fuller scale, add steps such as #1A1A1A, #333333, #666666, #999999 and #CCCCCC.
Is it grey or gray?
Both are correct. Gray is more common in American English and grey in British English, and CSS accepts either spelling for the same value, #808080.
Is grey text on a black background accessible?
It depends on the grey. #808080 on pure black scores 5.32:1, which passes WCAG AA for body text, but the same grey on #1A1A1A drops to 4.41:1 and fails. Use #999999 or lighter on dark surfaces to be safe.
What colors go well with black and grey?
White and off-white are the easiest additions. For color, a single accent such as red, amber, purple or a metallic blue works best, kept to around 10 percent of the design.
What ratio of black to grey looks best?
A good starting point is mostly grey in light and mid tones, a smaller share of dark grey, and black in small doses for edges and detail. In rooms, roughly 60 percent light or mid grey, 30 percent dark grey and 10 percent black is reliable.
Keep exploring
- Pink and Purple Color Combination: Palettes and Hex Codes
- Orange and Black Color Scheme: Palettes and Hex Codes
- Blue and Black Color Combination: Palettes and Hex Codes
- Yellow and Blue Color Scheme: Palettes and Hex Codes
- Orange and Brown Color Combination: Palettes and Hex Codes
- Purple and Gold Color Palette: Combinations and Hex Codes
- Honey Blonde Color: Hex Code, RGB and Palettes
- Light Green Color: Hex Code, RGB and Palettes