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-sierraFreeEffect 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
| Property | Type | Default | Description |
|---|---|---|---|
pattern | string | "sierra" | Dither pattern algorithm |
pixelation | number | 4 | Point size (1-10) |
paletteId | string | "monochrome" | Color palette ID |
colors | string[] | ["#000", "#fff"] | Color array (dark to light) |
brightness | number | 1 | Brightness adjustment (0.5-2) |
contrast | number | 1 | Contrast adjustment (0.5-2) |
threshold | number | 0.5 | Error 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/32The 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
| Algorithm | Quality | Speed |
|---|---|---|
| Floyd-Steinberg | Good | Fast |
| Sierra | Very Good | Medium |
| Jarvis-Judice-Ninke | Excellent | Slower |
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