Web design styles - colour and texture
Grainy gradient web design
Grainy gradients are soft blends of colour with a fine film-grain texture over the top. The grain makes flat digital gradients feel tactile and analogue, and it hides the banding that smooth gradients often show. They’re popular in hero sections, brand backgrounds and cards, and they can be made entirely in CSS and SVG.
A live example
This sample page is built with this page’s own CSS. The grain here is a fine CSS dot pattern. Switch to the common mistake to see the grain and colour drowning the text.
Spring trips
Plan your next weekend away
Pick a city, choose your dates and we’ll put the whole trip in one place.
Stays
Hotels and flats near where you’ll be. Pick by area, price or how close you are to the station.
Find a stayDone well: the grain is subtle, and text sits on a slightly darker panel so it stays readable over the bright parts of the gradient.
What makes it grainy gradients
Soft colour blends
Two to four colours fading into each other, often as blurred blobs.
radial-gradient()A fine grain
Noise laid over the gradient, like film grain or risograph print.
feTurbulenceNo banding
The grain breaks up the visible steps that smooth gradients can show.
mix-blend-modeCalm surfaces on top
Text and controls sit on plainer panels above the texture.
background: rgba(...)The CSS
The gradient is plain CSS. The grain is an SVG noise filter laid over the top with a pseudo-element, so you can control its strength with one opacity value.
.grainy {
position: relative;
isolation: isolate;
background:
radial-gradient(circle at 15% 20%, #ff7a59, transparent 45%),
radial-gradient(circle at 85% 30%, #7b5cff, transparent 45%),
radial-gradient(circle at 50% 100%, #ffb347, transparent 50%),
#2a1b3d;
}
/* The grain: SVG noise laid over the gradient */
.grainy::after {
content: "";
position: absolute;
inset: 0;
z-index: -1;
pointer-events: none;
opacity: 0.25; /* grain strength */
mix-blend-mode: overlay;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Text gets a calmer surface to sit on */
.grainy .panel {
background: rgba(20, 10, 30, 0.5);
border-radius: 20px;
color: #ffffff;
}Tuning the values
| Property | A good starting range | What goes wrong outside it |
|---|---|---|
| Grain opacity | 0.15 to 0.35 | Stronger and text edges look fuzzy. Weaker and you lose the effect and the banding comes back. |
baseFrequency | 0.6 to 1.0 | Lower values give a blotchy, cloudy grain rather than a fine one. |
| Colours | 2 to 4 | More colours turn muddy where they blend. |
| Panel behind text | 0.5 to 0.7 dark | Without it, white text fails contrast over the bright parts of the gradient. |
When it works
- Hero sections and brand backgrounds.
- Cards and tiles that need a bit of warmth.
- Brands that want to feel crafted, creative or analogue.
When to avoid it
- Behind long passages of text.
- Interfaces with lots of small text and controls.
- Pages that need to be printed.
Under the hood
How the grain works
The grain comes from an SVG feTurbulence filter, which generates random noise. Drawn into a small SVG and laid over the gradient, it adds texture without any image files. The blend mode decides how the noise mixes with the colour underneath.
Overlay or soft light
mix-blend-mode: overlaykeeps colours bright.soft-lightis subtler.multiplydarkens the whole thing.Keep it on a pseudo-element
Putting the grain on
::aftermeans it never covers text or catches clicks.Watch the file size
The inline SVG is tiny, but a large grainy PNG or JPEG can be hundreds of kilobytes.
Test on real screens
Grain looks very different on high-resolution displays. Check it on an ordinary laptop screen too.
What to check when you review a grainy gradient site
Grainy gradients are decorative, so the checks are about making sure the decoration never gets in the way.
.grainy p1. Text over the brightest colour
Check text reaches 4.5:1 over the lightest part of the gradient, not the average.
.grainy::after2. Grain behind text
Heavy grain makes letters look fuzzy. Check text stays crisp, ideally on a calmer panel.
.grainy::after { pointer-events }3. Grain catching clicks
Check the grain layer doesn’t block buttons and links. It needs pointer-events: none.
background-image4. Image weight
If the grain or gradient is an image, check its file size. Inline SVG noise is usually far smaller.
.hero5. Banding
Check large gradients on an ordinary screen for visible steps in the colour.
@media (prefers-contrast: more)6. High-contrast settings
Check the grain and gradient calm down when someone has asked for more contrast.
@media print7. Printing
Check the page doesn’t print as a solid block of ink.
:focus-visible8. Focus outlines
Check focus outlines are visible over every part of the gradient.
Reviewing with clients
Notes on the exact spot where the grain gets in the way
Grain and gradients look different on every screen, so a client’s "it looks a bit fuzzy" is hard to act on without seeing their device. With ClickNote, clients click directly on elements of the website and leave a note, without creating an account or installing a browser extension.
Send your client a review link for the page.
They click the text that looks fuzzy and say what they see.
You get the selector, a screenshot and their device, so you can go straight to the right rule in your CSS.
The texture makes this text look a bit blurry on my laptop.
laptop · Edge on Windows - 1366 x 768
.d-card.c2 > .d-textReviewing a site in one of these styles?
Send your client a review link and they can click directly on elements of the website and leave a note, without creating an account or installing a browser extension. You get the selector, a screenshot and their device with every note.
14-day free trial. No card needed. See pricing.