Grain and noise texture generator

Give flat gradients a tactile, printed feel with grain. The texture is a tiny SVG filter rather than an image, so it adds well under a kilobyte to your CSS.

Free · no sign-up · copy and paste

Controls

CSS

How to use the grain and noise texture generator

  1. Choose a background. Pick two colours and an angle for the gradient underneath. Grain is most noticeable on smooth gradients and large flat areas.
  2. Adjust the grain. Grain size sets how fine the speckles are; detail adds finer layers of noise. Strength controls how visible it is.
  3. Pick a blend mode. Overlay and soft light keep the colours rich and add texture in both the highlights and shadows. Multiply darkens; screen lightens.
  4. Copy the CSS or download a tile. The CSS adds the grain as a layer on a pseudo-element, so your content stays sharp on top. Prefer an image? Download a seamless PNG tile instead.

Why add grain?

Large gradients on screens can look plasticky, and on some displays they show visible stepped bands of colour. A little noise breaks up those bands, adds depth and gives designs the tactile quality of print or film. It’s become a signature of modern landing pages and brand illustrations.

How the CSS works

SVG’s feTurbulence filter generates noise mathematically. Wrapped in a data URI, it becomes a background image only a few hundred bytes long that the browser renders at any resolution. Placing it on a ::after pseudo-element with mix-blend-mode blends it into whatever is underneath without affecting text or other content.

Performance

The noise is rendered once per tile and then cached, so it’s cheap for static backgrounds. Avoid animating it over large areas, which forces the browser to redraw it constantly, and test on low-powered phones if you layer it on many elements.

Using it in WordPress, Elementor, Divi, Bricks and Breakdance

Choose your page builder from Paste into, above the code, and Refract rewrites the CSS for it. Elementor Pro and Divi 5 use the selector keyword, Bricks uses %root% and Breakdance uses %%SELECTOR%%, so the effect only applies to the element you paste it into. Elementor’s newer V4 atomic elements (Heading, Image, Button, Div block) work differently: their Custom CSS sits inside the element’s own style, so Refract splits the code into a part for the element and a part for your site-wide CSS. For the WordPress block editor, free Elementor and Divi 4, you add a CSS class to the element and paste the CSS into your site’s custom CSS. The numbered steps under the code show exactly where to click, and Refract remembers your builder for every tool.

Frequently asked questions

Does SVG noise work in every browser?

Yes. feTurbulence and mix-blend-mode are supported in all current browsers.

Why does the grain look different in Safari?

Browsers render feTurbulence with slightly different detail. The effect is the same, but strength can vary a little; check it in each browser you support.

Can I use the grain on an image?

Yes. Put the class on an element containing the image, or on a wrapper around it. The pseudo-element sits over the content and blends into it.

Can I use this in Elementor, Divi or Bricks?

Yes. Choose your page builder under Paste into, above the code. The CSS is rewritten for that builder, and the steps underneath tell you exactly where to paste it. WordPress’s block editor and Breakdance are supported too.