Back to Node List

Dither

dither

Quantizes to a palette with ordered, image-pattern, or error-diffusion dithering; palette order can be preserved as a shading ramp.

Reviewed
Guide available
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Input Ports

NameTypeDescription
画像
input
Image
Required
ディザリングしたい画像です
パレット
palette
Palette
任意のパレット入力です。未接続なら画像からパレットを抽出します
しきい値パターン画像
threshold_map
Image
画像パターン方式でタイル反復するグレースケール画像です。明るい画素は次のパレット色へ進め、暗い画素は手前の色を残します。

Output Ports

NameTypeDescription
画像
output
Image
ディザリング後の画像です
パレット
palette
Palette
ディザリングに使ったパレットです

Parameters

NameTypeDefaultRangeDescription / Options
ディザ方式
mode
Enum
Ordered4x4

どのディザ方式を使うかです

  • 順序 4x4Ordered4x4
    4x4 の Bayer 行列で、規則的な順序ディザをかけます。
  • 誤差拡散FloydSteinberg
    Floyd-Steinberg の誤差拡散ディザをかけます。
  • 画像パターンPatternImage
    接続したしきい値パターン画像をタイル反復します。Pixel Canvas・ノイズ・パターン系で網点を自由に設計できます。
色の選び方
color_choice
Enum
NearestColor

一般画像は『近い色』、素材・キャラの影→ハイライト順を守る時は『パレット順』を使います。パレット順には並びを決めたパレット接続が必要です。

  • 近い色NearestColor
    ディザ適用後に最も近いパレット色を選びます。従来と同じ方式で、一般的なカラー画像の減色向けです。
  • パレット順PaletteOrder
    接続パレットを順序付きランプとして扱い、隣接スロットだけを混ぜます。影→ハイライトの並びを崩したくない時に使います。
ランプ位置の基準
ramp_source
Enum
OKLCH-L

入力のどの値を、パレット先頭→末尾の位置に使うかです。陰影ランプは通常OKLCH明度、マスクの段階化はAlphaが目安です。

  • OKLCH 明度OKLCH-L
    見た目の明るさで判定します。影やハイライトなど、目で見た明暗に合わせたい時に使います。
  • OKLCH 彩度OKLCH-C
    色の鮮やかさで判定します。くすんだ色と鮮やかな色を分けたい時に使います。
  • HSV 彩度HSV-S
    HSV の鮮やかさで判定します。一般的な色相・彩度・明度の感覚で選びたい時に使います。
  • HSV 明度HSV-V
    RGB の一番明るいチャンネルを基準にします。光った色や原色の強さを見たい時に使います。
  • RGB 赤RGB-R
    赤の強さで判定します。赤みだけを抜き出したい時に使います。
  • RGB 緑RGB-G
    緑の強さで判定します。緑成分だけを抜き出したい時に使います。
  • RGB 青RGB-B
    青の強さで判定します。青成分だけを抜き出したい時に使います。
  • アルファAlpha
    透明度で判定します。不透明な形だけをマスクにしたい時に使います。
  • 輝度Luminance
    RGB から計算した明るさで判定します。OKLCH より単純な白黒変換に近い結果が欲しい時に使います。
抽出モード
extract_mode
Enum
Representative

パレット入力がない時に、画像からどうパレットを作るかです

  • 実色抽出Exact
  • 代表色抽出Representative
最大色数
max_colors
Int
161–256

抽出時に残す最大色数です

透明色をパレット抽出に含める
include_transparent
Bool
false

パレット抽出時に完全透明ピクセルも含めます

透明ピクセルも加工する
process_transparent_pixels
Bool
false

完全透明ピクセルの非表示RGBもディザリング・減色します

元の透明度を保つ
preserve_alpha
Bool
true

色を変えても、元画像の透明度はそのまま残します

強さ
strength
Float
10–2 / step 0.01

ディザ模様をどれくらい強く出すかです

Overview

Quantizes to a palette while applying a dither pattern that represents intermediate tones with few colors. It is essential for reducing gradients to a 2–16-color texture that reads as retro pixel art.

Usage tips

  • Choose the method by look: orderly checkerboard retro texture → Ordered4x4; natural photographic grain → FloydSteinberg; hand-drawn dots, crosshatching, or wood grain → PatternImage. Ordered and Pattern Image often feel more deliberately placed.
  • In PatternImage, connect a small grayscale image to threshold_map. It tiles across the output: bright pattern pixels advance to the next palette color, while dark pixels hold the previous color. Start with a 4–16 px Pixel Canvas and strength 0.3–0.7.
  • Use NearestColor for general full-color reduction. Use PaletteOrder when the slots deliberately run shadow → midtone → base → highlight. It mixes only adjacent slots, preventing color distance from jumping over a designed shading stage.
  • Palette Order requires a connected palette with at least two colors. For ramp_source, start with OKLCH lightness for shading, RGB-R or luminance for a 0–1 control image, and Alpha for an opacity ramp.
  • Connecting a palette is the standard setup. Connect the project palette to keep the asset within the overall color system. When unconnected, colors are extracted automatically from the image, with the count controlled by max_colors.
  • strength controls the visibility of the pattern in both modes. 1 is standard; 0.3–0.7 gives a subtle pattern, 2 creates a strongly gritty texture, and 0 performs palette quantization without adding ordered offsets or diffusing quantization error.
  • include_transparent affects automatic palette extraction only. process_transparent_pixels separately controls whether hidden RGB in fully transparent pixels is quantized. Both should normally stay OFF.
  • Gradient → dither with a 2–4-color palette quickly creates retro skies, glows, and water.

Common pitfalls

  • No pattern appears: dithering has no effect when the input has no intermediate tones and already matches the palette exactly. Use it on continuous-tone gradients or noise.
  • No pattern appears after Gradient Map(Steps): Steps already discarded the fractional position between palette slots. Feed the continuous source directly to Dither and select PaletteOrder when those intermediate tones should become dots.
  • Pattern Image still looks like 4×4 ordered dots: threshold_map is unconnected. The node safely falls back to Ordered 4×4 and shows a warning until a pattern arrives.
  • Palette Order behaves like closest color: connect an intentionally ordered palette containing at least two colors. Auto-extracted colors have no user-defined slot order, so the node warns and falls back to closest color.
  • Colors look muddy or unexpected colors appear: automatic extraction with Representative creates average representative colors. Connect a palette or use extract_mode = Exact when only specified colors are allowed.
  • Transparent areas look wrong: preserve_alpha (ON by default) retains source transparency. Enable include_transparent only to include transparent colors in an extracted palette, and enable process_transparent_pixels only when their hidden RGB should also be modified.

Notes

  • 誤差拡散 tends to preserve local contrast; 順序 4x4 is regular and easy to control.
  • Pattern Image reads RGB luminance and ignores pattern alpha. Use invert upstream when the spatial pattern should be reversed.
  • Palette Order preserves the adjacent-slot restriction in Ordered 4×4, Pattern Image, and error-diffusion modes.
  • When a palette input is connected, that palette is used as-is.
  • _count is the number of palette colors actually used.

Examples

  1. Reduce to the color count produced by Palette Extract.
  2. Create a retro screen pattern with a two-color black-and-white palette.
  3. Produce a more visibly patterned quantization than Palette Quantize.
  4. Draw an 8×8 wood hatch in Pixel Canvas, then combine PatternImage + PaletteOrder so only neighboring colors in the wood ramp alternate.

Related nodes

  • palette_quantize — simple quantization without dithering for flat results
  • palette_extract — extract the quantization palette from an image
  • gradient_generate / noise_generate — create continuous tones that show dithering well
  • posterize — reduce tonal steps by count rather than by palette
  • gradient_map — create flat palette bands; feed continuous values directly here for palette-order dithering
Back to Node List
Dither — PixPipeline Node Reference