Perlin Noise

펄린 노이즈

A smooth, cloudlike color field that gently changes over time.

Also known as: PerlinNoisegradient noisecoherent noise

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, PerlinNoise } from 'shaders/react'

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

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

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

export default function ShaderEffect() {
  return (
    <Shader style={{ width: '100%', height: '320px' }} disableTelemetry>
      <PerlinNoise />
    </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: 'PerlinNoise',
    }
  ]
}, { disableTelemetry: true })

Props · PerlinNoise

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
scaleScale2-2 – 5 (step 0.1)Pattern scale (higher = finer, more detailed patterns; each +1 roughly doubles the frequency)
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
speedSpeed10 – 5 (step 0.1)Animation speed

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

The pattern looks like an enlarged patch of fog or cloud: its soft regions flow into one another without hard edges. It works well when a screen needs natural color variation instead of a flat fill.

`scale` defaults to 2 and ranges from -2 to 5; increasing it makes the pattern finer. `contrast` defaults to 0 and ranges from -1 to 5; higher values sharpen color transitions. `speed` defaults to 1 and ranges from 0 to 5; higher values make the pattern change faster. `balance` defaults to 0 and ranges from -1 to 1, shifting the mix toward the second color below zero and the first above zero.

This is a generator that fills the canvas, not a filter that transforms input. Use it as a background on its own or layer it with `FractalNoise` for variation at more than one scale. If text sits over it, keep `contrast` low enough for the text to remain readable.

When to use

Use it for foglike backgrounds, organic color patches, and slowly moving abstract scenes. Avoid it when you need a repeating grid or crisp pixel edges.

Open as page ↗