Blue Noise

블루 노이즈

Even, high-frequency speckle that works well as a grain or dithering pattern.

Also known as: BlueNoiseblue noiseblue-noise dither

Moves in browsers that support WebGPU

This device could not render the demo — showing a still

React
// Renders only in browsers with WebGPU.
import { Shader, BlueNoise } from 'shaders/react'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: 320 }} disableTelemetry>
      <BlueNoise />
    </Shader>
  )
}
Vue
<!-- Renders only in browsers with WebGPU. -->
<script setup lang="ts">
import { Shader, BlueNoise } from 'shaders/vue'
</script>

<template>
  <Shader style="width: 100%; height: 320px" :disable-telemetry="true">
    <BlueNoise/>
  </Shader>
</template>
Svelte
<!-- Renders only in browsers with WebGPU. -->
<script>
  import { Shader, BlueNoise } from 'shaders/svelte'
</script>

<Shader style="width: 100%; height: 320px" disableTelemetry>
  <BlueNoise />
</Shader>
Solid
// Renders only in browsers with WebGPU.
import { Shader, BlueNoise } from 'shaders/solid'

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: '320px' }} disableTelemetry>
      <BlueNoise />
    </Shader>
  )
}
JavaScript
// Renders only in browsers with WebGPU.
// expects <canvas id="canvas" style="width:100%;height:320px"></canvas> on the page
import { createShader } from 'shaders/js'

const shader = await createShader(document.getElementById("canvas"), {
  components: [
    {
      type: 'BlueNoise',
    }
  ]
}, { disableTelemetry: true })

Props · BlueNoise

Changes apply to the demo above and to the code tabs. Descriptions come from the library registry (MIT).

NameValueDefaultRange / optionsDescription
colorAColor A#ffffff—First color
colorBColor B#000000—Second color
stopsColorsSet in codenull—Multi-stop gradient colors (overrides Color A / Color B when set)
colorSpaceColor Spacelinearlinear · oklch · oklab · hsl · hsv · lchColor space for color interpolation
grainGrain Size11 – 32 (step 1)Grain size in pixels (1 = per-pixel, higher = chunkier speckle)
contrastContrast0-1 – 5 (step 0.1)Pattern contrast (higher = sharper transitions)
balanceBalance0-1 – 1 (step 0.05)Balance between colors (negative = more colorB, positive = more colorA)
seedSeed00 – 100 (step 1)Random seed for pattern variation

Every component also takes blendMode · opacity · visible · maskSource/maskType · boundingBox · id

Its speckles are spread evenly across the canvas instead of clumping in one area. The result resembles fine sand, with tiny grain taking priority over broad cloudy patches.

`grain` defaults to 1 pixel and ranges from 1 to 32; higher values make the speckles chunkier. `contrast` defaults to 0 and ranges from -1 to 5; higher values separate the dots from the background more clearly. `balance` defaults to 0 and ranges from -1 to 1, changing the mix between the two colors. `seed` defaults to 0 and ranges from 0 to 100, changing the dot layout.

This generator draws the speckle pattern itself rather than filtering an input image. Combine it with a gradient or solid-color layer to create grain for dithering or a fine surface texture. Small `grain` with high `contrast` can make the screen look rough, so reduce the speckle size when it sits beside text.

When to use

Use it for dithering patterns, fine surface grain, and evenly scattered abstract speckles. Avoid it for soft cloudlike patches or large forms.

Open as page ↗