Noise Texture Generator

Fine grain to lay over flat colors and gradients, which also hides gradient banding. Adjust opacity, grain size and density; the PNG tiles without visible seams.

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.

Gradient banding compared with a smooth gradient fixed by a grain noise texture

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

TypeLookTypical use
Monochrome noiseGrey speckles of varying brightnessGeneral grain, film look
Color noiseRandom colored specklesRetro, vibrant textures (use sparingly)
Light-only specksBright dotsGrain on dark backgrounds
Dark-only specksDark dotsGrain on light backgrounds, paper texture
Larger grain sizeCoarser, visible textureStylised, 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

AspectPNG tileSVG feTurbulence
File size30–150 KB (cached once)Under 1 KB
Rendering costLowCan be high on large areas
Consistency across browsersIdenticalSlight differences
Adjust without re-exportingNoYes

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.