Effects / Dither

Sierra

Sierra dithering (also known as Sierra-3 or Three-row Sierra) is a high-quality error diffusion algorithm that produces smooth gradients with minimal visible patterning. It strikes a good balance between quality and computational efficiency.

dither-sierraFree

Effect ID: dither-sierra

Example Configuration

sierra.json
{
  "effectId": "dither-sierra",
  "dither": {
    "pattern": "sierra",
    "pixelation": 4,
    "paletteId": "monochrome",
    "colors": ["#000000", "#ffffff"],
    "brightness": 1,
    "contrast": 1,
    "threshold": 0.5
  }
}

Settings

PropertyTypeDefaultDescription
patternstring"sierra"Dither pattern algorithm
pixelationnumber4Point size (1-10)
paletteIdstring"monochrome"Color palette ID
colorsstring[]["#000", "#fff"]Color array (dark to light)
brightnessnumber1Brightness adjustment (0.5-2)
contrastnumber1Contrast adjustment (0.5-2)
thresholdnumber0.5Error diffusion strength (0-1)

How It Works

Sierra uses a 5×3 error diffusion matrix:

        X    5/32  3/32
2/32  4/32  5/32  4/32  2/32
     2/32  3/32  2/32

The Sierra family includes three variants:

  • Sierra (3-row) - Full algorithm, highest quality
  • Two-Row Sierra - Faster, slightly lower quality
  • Sierra Lite - Fastest, simplified version

Comparison

AlgorithmQualitySpeed
Floyd-SteinbergGoodFast
SierraVery GoodMedium
Jarvis-Judice-NinkeExcellentSlower

API Usage

render-request.json
POST /api/v1/render
{
  "state": {
    "canvas": {
      "aspectRatio": "16:9",
      "backgroundColor": "#1a1a1a"
    },
    "layers": [...],
    "selectedLayerId": null,
    "effect": {
      "effectId": "dither-sierra",
      "enabled": true,
      "dither": {
        "pattern": "sierra",
        "pixelation": 4,
        "paletteId": "monochrome",
        "colors": ["#000000", "#ffffff"],
        "brightness": 1,
        "contrast": 1,
        "threshold": 0.5
      }
    }
  },
  "format": "png",
  "width": 1920,
  "height": 1080
}

Tips

  • Great default choice for general-purpose dithering
  • Produces smoother gradients than Floyd-Steinberg
  • Good for photographs with subtle tonal variations
  • Use Sierra Lite variant for faster processing when quality is less critical