Grain and Noise Textures: Why They Fix Gradient Banding and Add Depth to Flat Design
Flat colors and smooth gradients can look sterile on screen, and large, subtle gradients often show ugly stripes called banding. A very light layer of noise, or grain, fixes both problems. It’s a technique borrowed from film photography and print, and it has become a signature of modern editorial and product design.
What causes gradient banding
Most screens and image formats use 8 bits per color channel, which means 256 possible levels for each of red, green and blue. That sounds like a lot, but consider a subtle gradient from #1a1a2e to #16213e across a 1920-pixel-wide hero section. The red channel only changes by 4 levels across the whole width. Each level has to cover about 480 pixels, so instead of a smooth blend you see four distinct vertical bands.
Banding is most visible in:
- dark gradients (our eyes are sensitive to small differences in dark tones),
- low-saturation gradients between similar colors,
- large areas such as full-screen backgrounds,
- images compressed with JPEG or video codecs, which add their own blockiness.
How noise fixes it: dithering
Dithering adds small random variations to each pixel. Instead of a hard edge where one level changes to the next, pixels near the boundary randomly take one value or the other. Our eyes average these tiny variations over an area and perceive a smooth transition between levels.
It’s the same principle used by newspapers printing photos with dots, by GIF images simulating more than 256 colors, and by audio engineers adding dither when reducing bit depth. In design, a faint grain layer over a gradient is a simple form of dithering.
Grain as an aesthetic
Beyond fixing banding, grain adds texture:
- Analogue warmth. It recalls film photography and printed paper, which feels more tactile than perfectly clean pixels.
- Depth. A slightly textured surface reads as a material rather than a flat color.
- Cohesion. Applying the same grain over photos, gradients and illustrations makes mixed visual elements feel like one set.
Many brands use subtle grain over gradient backgrounds and illustrations for exactly this reason.
Types of noise
| Type | Look | Typical use |
|---|---|---|
| Monochrome noise | Grey speckles of varying brightness | General grain, film look |
| Color noise | Random colored speckles | Retro, vibrant textures (use sparingly) |
| Light-only specks | Bright dots | Grain on dark backgrounds |
| Dark-only specks | Dark dots | Grain on light backgrounds, paper texture |
| Larger grain size | Coarser, visible texture | Stylised, print-like look |
Random per-pixel noise has no structure, so a square tile of it repeats seamlessly. The noise texture generator above creates these tiles with adjustable opacity, grain size and density, and exports a transparent PNG.
Using noise in CSS
Layer the noise tile over your background with multiple backgrounds:
.hero {
background:
url("noise.png"),
linear-gradient(135deg, #1a1a2e, #16213e);
}The first image is drawn on top. Because the noise PNG is semi-transparent, the gradient shows through with a fine grain.
For richer results, put the noise on a pseudo-element with a blend mode:
.hero { position: relative; }
.hero::after {
content: ""; position: absolute; inset: 0;
background: url("noise.png");
mix-blend-mode: overlay;
opacity: 0.4;
pointer-events: none;
}overlay lightens light areas and darkens dark ones, so grain looks natural across the whole tonal range.
SVG noise filters
SVG has a built-in noise generator, feTurbulence, which can create grain without any image file. It’s flexible and tiny, but it’s computed by the browser, and large full-screen filters can be slow to render, especially on phones. A pre-rendered PNG tile is usually faster and more predictable.
PNG tile versus SVG filter
| Aspect | PNG tile | SVG feTurbulence |
|---|---|---|
| File size | 30–150 KB (cached once) | Under 1 KB |
| Rendering cost | Low | Can be high on large areas |
| Consistency across browsers | Identical | Slight differences |
| Adjust without re-exporting | No | Yes |
Keep it subtle
The most common mistake is too much grain. Guidelines:
- Opacity of 5–20% for backgrounds; text areas should be at the low end.
- Fine grain (1px) for screens; coarser grain only for a deliberate stylised look.
- Don’t place noise directly behind small body text; it reduces legibility.
- Check text contrast against the background without relying on the grain.
File size and compression
Noise is, by definition, random, which makes it hard to compress. A 256 × 256 PNG tile of semi-transparent noise is often 50–150 KB, depending on opacity and density. Use one small tile across the whole site so it is downloaded once and cached. Avoid exporting large noisy images as JPEG; JPEG compression struggles with noise and creates blocky artifacts, which defeats the purpose.
Noise in images versus noise in CSS
If you add grain directly to a photo or gradient image and then compress it, the file size grows significantly. Adding noise as a separate CSS layer keeps the main image small and smooth while still showing grain on screen. For exported assets like social images and wallpapers, bake the grain in and export PNG, or a high-quality JPEG with minimal compression.