Web Design & UI/UX10 min read

Text on Images: How to Make Text Readable on Any Photo

White text straight on a photo is easy to read in one corner and gone in the next. Check the brightest spot under the letters, then protect the text with a gradient, a black 55% scrim, a solid panel or a blur tinted black 55%.

By Boone
XLinkedIn
Text on Images: How to Make Text Readable on Any Photo

A photo is not one color, so white text straight on it is a gamble. The same title can be easy to read over a dark crowd and vanish into a stage light two letters later. Here is the one check that tells you which part fails, the four ways to protect the text, the exact settings, and the code to hand your developer.

Why white text on a photo breaks

Designers check text against one background color, the way our paper on accessible color contrast teaches. A photo has thousands. The event card below has a dark crowd at the bottom and a wall of white stage lights at the top, and the title sits right in the lights.

Neon Harbor

Whole photo, average

Neon Harbor

Behind the title, average

Neon Harbor

Behind the title, brightest spot

Three readings of the same card. White text passes the first and disappears into the last.

Feed a contrast checker the average of the whole photo and white text passes. The letters do not sit on the average. They sit on whatever pixel is behind them, and behind this title some pixels are pure white. That is where a reader loses the word.

Fix 1: check the brightest spot

An event card with white text straight on a concert photo. A red ring marks the title over white stage lights, a green ring marks the place line over the dark crowd

The red ring sits on the title, over the stage lights. The green ring sits on the place line, over the crowd. Same white text, same photo: one spot is hard to read and one is easy.

This is the check WCAG itself describes. Its failure F83 says the text needs enough contrast with "those parts of the image that are most like the text and behind the text". For white text, that means the lightest area under the letters. Check every line on its own, because the kicker, the title and the place line each sit on a different part of the photo.

The same check applies to hero sections, video thumbnails, story covers, product shots with a price on them and any card where someone else uploads the photo. If you do not control the photo, assume the brightest spot will land under your text.

Fix 2: add a gradient where the text sits

Straight on the photo

An event card with the white title lost in the stage lights

Black 70% to clear

The same card with a black gradient at the top, the white title clear
The gradient darkens only the edge the text sits on. The stage below stays as bright as it was.

Use a gradient when the text sits on one edge of the photo. The settings: black at 70% at the edge, 55% at 30% of the height, clear at 62%.

The shape follows Material Design's imagery guidance: the middle stop sits toward the dark end, and the gradient runs long, about three times the height of an app bar. A short gradient leaves a visible band; a long one reads as light falling off.

Flip it for text at the bottom: a hero with a headline at the foot, a video player's controls, a product card with a price under the photo.

Fix 3: dim the whole photo with a 55% scrim

Black 20%

The event card under a light black scrim, the title still fading into the lights

Black 55%

The event card under a black 55% scrim, every line of text clear
A light scrim makes the photo moodier and leaves the text where it was. At 55% every line holds.

A scrim is a flat layer of black over the whole photo. Use it when text runs across the picture, top to bottom, and a gradient would have to cover everything anyway.

Why 55%: black at 55% over pure white gives #737373, and white text on #737373 is still easy to read at body size. So 55% works over any photo, even one with a blown-out white spot right under the text. Material suggests scrims between 20% and 40%, which is fine for big headlines over a darker photo. Over white, 40% gives #999999, too light even for large text.

Fix 4: put it on a solid panel

Black 55% on it all

The event card under a 55% scrim, the stage dark

Solid white panel

The card with a solid white panel behind the kicker and title in #111111, the stage bright
The scrim fixes the text and dims the show. The panel fixes the text and leaves the stage as bright as the photographer shot it.

A solid panel works on any photo, every time, because the text never touches the photo at all. Here it is white with #111111 text behind the kicker and the title, and the place line stays on the dark crowd where it already read well.

Pick a panel when the photo is the product: a listing, a menu dish, an album cover, a photo in a social feed. Airbnb does this with its "Guest favorite" label, a solid white pill on the listing photo. It also suits short labels like a price, a "New" tag or a timer, where a gradient would be more effect than text.

Fix 5: tint the blur

Blur only

The card with a frosted white blur panel behind the title, the white text washed out

Blur + black 55%

The card with the same blur panel tinted black, the white text clear
Blur removes detail, not brightness. The tint is what makes the text readable.

Frosted glass is everywhere, and it is the protection most often done half way. A background blur turns the stage lights into a soft white glow, but a white glow is still white. With a light white tint on top, the title is no easier to read than it was on the bare photo.

Keep the blur and tint it dark. In Figma that is a background blur of 24 on a layer filled black at 55%. You keep the glass look and the photo still shows through, and the text has a dark background again. The same goes for frosted tab bars, sheets and sticky headers over scrolling photos.

The five settings

ProtectionUse it whenSetting
Checkunder every letterthe brightest spot, line by line
Gradienttext on one edgeblack 70% at the edge, 55% at 30%, clear at 62%
Scrimtext all over the photoblack 55%
Panelthe photo must stay brightsolid, #FFFFFF with #111111 text
Blurthe photo should show throughbackground blur 24 + black 55%
The colors the protections render to. Tap a color to copy its code.

Hand this to your developer

css
.card { position: relative; overflow: hidden; border-radius: 20px; } .card img { width: 100%; height: 100%; object-fit: cover; } /* Gradient: text on the top edge */ .card--gradient::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgb(0 0 0 / 0.70) 0%, rgb(0 0 0 / 0.55) 30%, rgb(0 0 0 / 0) 62%); } /* Scrim: text across the whole photo */ .card--scrim::after { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / 0.55); } /* Panel: the photo stays bright */ .card__panel { background: #FFFFFF; color: #111111; border-radius: 10px; } /* Blur: always tinted */ .card__glass { background: rgb(0 0 0 / 0.55); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }

Put the text above the overlay in the stacking order, keep secondary lines lighter only on a solid panel (our gray text color paper has the values), and keep the overlay even when the current photo happens to be dark. The next photo an editor uploads will not be.

The numbers, for the person defending the choice

Measured on this event card at the size it ships, 272 by 340, at the brightest spot under each line. The 28 px bold title counts as large text, so it has a lower bar than the 13 px kicker and the 15 px place line.

TextWCAG minimum
Kicker (13 px) and place line (15 px)4.5 to 1
Title (28 px bold, large text)3 to 1
CardKickerTitle
Straight on the photo1.06 to 11.02 to 1
Gradient, black 70% to clear7.09 to 14.80 to 1
Scrim, black 20%1.68 to 11.63 to 1
Scrim, black 55%4.92 to 14.78 to 1
Solid white panel, #111111 text18.88 to 118.88 to 1
Blur only, white 12%1.25 to 11.07 to 1
Blur 24 + black 55%5.77 to 14.95 to 1

The worst case, white text over a pure white spot, decides the scrim setting:

White text onRendersContrast
Black 55% over white#7373734.74 to 1
Black 54% over white#7575754.61 to 1
Black 40% over white#9999992.85 to 1
The place line on the bare crowd5.97 to 1
The place line under the 55% scrim13.84 to 1
The whole photo's average#6F676C5.48 to 1

The last row is why checking the average lies: it passes while the title disappears.

FAQ

How do you make text readable on an image?

Give the text its own background. Use a black gradient on the edge where the text sits, a black scrim at 55% over the whole photo, a solid panel behind the text, or a background blur tinted black at 55%.

What opacity should a dark overlay on an image be?

Black at 55% keeps white body text readable on any photo, even over a pure white spot. Lighter overlays such as 20% to 40% only work for large text over photos that are already dark.

How do you check the contrast of text on a photo?

Compare the text with the lightest part of the image directly behind the letters, not the photo's average. Check each line separately, since each sits on a different part of the picture.

Is a blurred background enough for text on an image?

No. A blur removes detail but keeps the brightness, so white text on a blurred white area is still hard to read. Tint the blur dark, black at 55% for white text.

Does text on an image need to meet WCAG contrast?

Interface text does: titles, labels, prices and buttons placed on a photo need the normal WCAG minimum, with a lower bar for large text. Text that is part of the picture itself, like a sign in a street photo, has no requirement.

Sources

  • WCAG 2.2, Success Criterion 1.4.3 Contrast (Minimum): 4.5:1 for text, 3:1 for large text, no requirement for text that is part of a picture.
  • WCAG Failure F83: using background images that do not provide sufficient contrast with foreground text.
  • Material Design imagery guidelines: scrim opacity of 20% to 40%, gradient center point toward the dark end, gradient about three app bar heights long.
  • The App Store Today tab on Apple's App Store, the layout model for the event card, and Airbnb's "Guest favorite" label on Airbnb listing photos, seen on 2026-11-16.
  • Contrast ratios measured with the WCAG relative luminance formula on renders of the card at 1x, text against the same render with the text hidden, at the brightest 2 by 2 pixel spot under each line. The photo averages were read from this page's card render. Overlay colors computed by alpha blending.
  • Photo: george charry, Crowd watching on a live concert, Pexels. "Neon Harbor World Tour" and "Harbor Arena" are invented for this page.
  • First published as a carousel on UX Brainy.

More from Brainy Papers

Keep reading