By Calder WynneBrand and UI designer, 12 years·Updated
The hex color for black is , the same as rgb(0, 0, 0) in RGB and cmyk(0%, 0%, 0%, 100%) in print. You can also write it as #000 or use the CSS keyword black.
I have specified black on brand systems, app interfaces and print jobs for twelve years, and it is the color that looks simplest and behaves least simply. Below are all the codes you need, plus when a softer near-black is the smarter pick, how black performs under WCAG, and why it prints differently from how it glows.
Black Hex Code, RGB, HSL and CMYK Values
Black is the minimum on every channel, so its hex code is three pairs of zeros. Each pair runs from 00 (no light) to FF (full light), and black sits at 00 for red, green and blue alike. Every other screen color is some amount of light added to this starting point.
Format
Value for black
HEX
(short form #000)
RGB
rgb(0, 0, 0)
RGB percent
0%, 0%, 0%
HSL
hsl(0, 0%, 0%)
HSB / HSV
0°, 0%, 0%
CMYK
0, 0, 0, 100
OKLCH
oklch(0% 0 0)
Binary RGB
00000000, 00000000, 00000000
The CMYK line needs a caveat. Screens add light and presses subtract it, so 0, 0, 0, 100 is the standard conversion (black ink only), not a measured match for what you see on screen. The print section below shows why that gap matters.
Why Black Has No Hue and What That Means for Palettes
Black is achromatic. Its HSL hue reads 0°, but that is only a default: with saturation at 0% and lightness at 0%, any hue you type in still produces the same black. White and every pure gray work the same way.
The palette maker above builds monochrome, analogous, complementary, triadic and split schemes from . Monochrome does the real work for black, because it gives you a ladder of grays. The other schemes collapse into near copies of the same color, since there is no hue to rotate around the wheel. The complement of black is simply white.
Black is a value, not a hue
Lightness is the only dial that matters. To build colorful harmonies around black, choose a hued accent first and let black act as the anchor.
How to Write Black in CSS: #000, Keywords and Alpha
All of the lines below produce identical pixels. Pick one style and stay consistent across a project. I prefer a custom property, so a later switch to an off-black is a one-line change.
The last two lines are a 60% black overlay, written in modern and in eight-digit hex form (99 is 153 out of 255). Semi-transparent black is the quickest way to darken a photo behind white text without adding a color cast. In Tailwind, the class bg-black is the same .
Pure Black vs Off-Black: Which One Should You Use?
Pure black suits a few jobs very well: a crisp logo on white, video letterboxing, thin rules and true-black themes. For large surfaces and long reading, a near-black is gentler. The jump between bright text and an absolute void is harsh, and shadows cannot show on a surface that is already at the floor.
On one app redesign I changed only the page background from to . The cards finally read as separate layers, and I did not touch a single shadow. Here are the near-blacks I reach for most:
: almost indistinguishable from pure black, good for page backgrounds
: the widely used dark theme baseline, recommended by Material Design
(Eerie Black): a comfortable text color on white
: a card or panel surface on top of
When you need a clearly visible step up, with a cool blue-gray cast, move to charcoal at .
Is Pure Black Good for Dark Mode and OLED Screens?
On OLED screens each pixel makes its own light, so a pixel set to switches off. That saves power and gives a true black next to bright content. It is why some apps offer a “true black” theme, and why I use pure black for splash screens and media areas.
What happens to a pixel set to #000000 on an OLED phone?
OLED pixels make their own light, so a pixel asked for pure black emits none.
The trade-offs are real. White text on pure black is the maximum contrast a screen can show, and some readers, especially people with astigmatism, see it glow or bleed. Shadows also vanish, so depth has to come from lighter surfaces. Some people notice smearing when scrolling content on OLED panels, where pixels must turn on from fully off.
Try this: Set a test page to a background with text, then switch to with text. Read a long paragraph on your phone in a dark room and note which one tires your eyes first.
Pure black on a screen is light switched off, while printed black still reflects light from the paper.
Black Text Contrast: WCAG Ratios You Can Trust
WCAG asks for at least 4.5:1 for normal text, 3:1 for large text and 7:1 for the stricter AAA level. Black on white scores 21:1, the highest ratio possible. In reverse, white text on still reaches 18.73:1, far past AAA.
Which background gives black text the weakest contrast?
Pure blue is so dark that black text on it reaches only 2.44:1, well below the 4.5:1 minimum.
Black text is not safe on everything, though. These ratios are computed from the WCAG luminance formula:
On saturated blue, white text is the better choice at 8.59:1. I learned this the hard way on a client button set, where black labels on a bright blue looked stylish in the mockup and failed every automated check.
Printing Black: K100, Rich Black and Proof Surprises
In CMYK, black is 0, 0, 0, 100: black ink only. That single-plate K100 is ideal for small text and thin lines, because one plate means no registration fringing. For large solid areas it can look flat or faintly gray, especially on uncoated paper.
Rich black puts cyan, magenta and yellow under the K for a deeper result. A commonly quoted starting mix is C60 M40 Y40 K100, but the right numbers depend on the press, paper and ink limit, so ask your printer. Keep rich black away from small text.
A proof once surprised me: a flat K100 background sat beside a rich-black logo, and the two read as different blacks. Since then I specify both values on one swatch sheet. Paper also reflects some light, so no printed black matches a screen pixel that emits none.
What Colors Go With Black?
Black works with almost anything, because it adds contrast without competing. The useful question is what mood you want: restrained and formal, or loud and electric.
Glowing accents pass AA on black, but muted charcoal fails at 2.12:1.
Neutrals and metals
White is the obvious partner. Warm cream like softens the contrast, while gold and silver give a formal, evening feel. For a bolder neutral scheme, look at the red and grey combination, where black can be the deepest anchor.
Accents that glow
Neon green such as and neon purple such as vibrate against black. For a sweeter contrast, pastel pink (about ) keeps black from feeling severe. A rainbow gradient on a black background looks like it is lit from behind.
Ready-to-Use Black Color Palettes
Each palette below starts from and gives every supporting color a job: paper, accent or surface layer. That is more useful than random swatches, because black rarely works alone.
Ink and Paper
Editorial sites, invitations and print layouts that need calm contrast and one accent.
Gold Leaf Evening
Luxury branding, event signage and packaging with a formal, after-dark mood.
Dark Mode Layers
App and dashboard interfaces where cards need to rise above the background.
Neon After Dark
Gaming pages, music posters and nightlife graphics that want glowing accents.
Copy any of them straight into your design tool or stylesheet. If a palette feels too stark, swap the pure black for and keep everything else the same.
Using Black in Branding, Fashion and Interiors
Black logos are practical: one ink, strong on light backgrounds, easy to reproduce. I usually set long text in a near-black like and reserve for the logo and rules. Always keep a one-color black version of any mark for stamps, embossing and fax-quality situations.
In fashion, blacks come with undertones. Dyes lean blue, brown or green, and fabric looks different in daylight than under shop lighting. Check swatches by a window before approving a run.
Paint is similar. Any painted wall reflects some light, so even a paint called black is never a true . Matte finishes look deepest, while gloss shows reflections and dust. Painters often avoid tube black alone and mix chromatic blacks from blue and brown for livelier shadows.
Where Black Comes From: A Short Color History
Black was one of the first colors artists used, in neolithic cave paintings made with charcoal and mineral pigments. Later pigments included lampblack and bone black. In the 19th century it became the color of poets, businessmen and statesmen, and in the 20th century it turned into a high fashion staple, helped by the little black dress of the 1920s.
In art, Kazimir Malevich painted his Black Square in 1915 as a deliberate reduction of painting to its minimum. On the web, black was among the 16 basic color names in HTML 4.01, defined as , which is why the hex code is the first one most designers learn.
Colors close to black
Black Color: questions people ask
What is the hex color for black?
The hex color for black is #000000. It means red, green and blue are all at zero, which is rgb(0, 0, 0) in RGB, hsl(0, 0%, 0%) in HSL and cmyk(0%, 0%, 0%, 100%) in print.
Is #000 the same as #000000?
Yes. CSS allows a three-digit shorthand where each digit is doubled, so #000 expands to #000000. The keyword black and rgb(0 0 0) give exactly the same result.
What is the complementary color of black?
In RGB terms the opposite of black is white, #FFFFFF. Because black has no hue, it has no true position on the color wheel, so a wheel-based complement does not really exist.
Should I use #000000 or #121212 for a dark mode background?
For most interfaces, #121212 is the better base because it lets you show raised surfaces with lighter grays and softens the glare of white text. Keep #000000 for OLED true-black themes, video areas and splash screens.
How do I get a deeper black in print?
Use a rich black, which adds cyan, magenta and yellow under 100% black ink. Ask your printer for the right values, since the best mix depends on the press, paper and ink limit.