Three Tone Styler
Posterize any image into a three-color design, using actual color theory
- images
- IMAGE
Three Tone Styler is the DJZ node that turns any image into a flat three-color poster, and unlike most "posterize" buttons it picks those three colors using actual color theory. You give it a base color and a relationship - Complementary, Triadic, Analogous, and so on - and it derives the other two palette members mathematically, then maps your image's luminance into those three tones. The result is the kind of stylized flat art you see on posters and album covers, generated from a photo without you touching a design tool.
How it works
Two stages, both worth understanding:
Palette generation. Your base_color (hex, like #0000FF) is converted to HSV. Then, depending on color_relationship, the node rotates the hue to find the partner colors: Complementary spins 180°, Triadic 120° apart, Analogous a small step to each side, Split Complementary goes to the two colors around the complement, and Primaries/Secondaries use the RGB/CMY wheel. This is the part that separates it from a dumb threshold - the palette is always harmonious by construction.
Tone mapping. The image's luminance gets split into three bands by threshold_low (default 0.3) and threshold_high (default 0.7). Which band maps to which of your three colors is chosen by tone_mapping: Highlights, Midtones, or Shadows. That's the "anchor" - you pick which tonal range carries your base_color, and the other two colors fill the other bands.
Inputs and outputs
- images - any IMAGE (batch-safe)
- base_color - the hex seed of your palette
- color_relationship - the six-way color-theory menu
- tone_mapping - Highlights / Midtones / Shadows (which band gets the base color)
- contrast (0.1–2), threshold_low / threshold_high (0–1) - the band boundaries and the push between them
- smoothing (optional, 0–1) - softens the hard posterization edges for a less brutal cut
- saturation (optional, 0–2) and preserve_luminance (optional, boolean) - keep it vibrant and keep the original brightness
Output: IMAGE, same dimensions.
Where you'd use it
This is a design node, not a photo node. It shines when you want a strong graphic look - poster art, stylized covers, thumbnail graphics, or a "reduce this photo to a three-tone motif" pass before compositing. Crank smoothing up and it drifts toward a duotone-with-texture look; keep it at 0 and it's hard posterization. If you're a ComfyUI person who also designs, this is one of the few nodes that genuinely does something a filter stack won't.
Install
Part of DJZ-Nodes by Drift Johnson. ComfyUI Manager → "DJZ-Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/DJZ-Nodes
cd DJZ-Nodes
pip install -r requirements.txt
Restart ComfyUI. Needs torch/numpy - already in ComfyUI.
Gotchas
The band thresholds are global, so a bright image and a dark image of the same subject will use the three colors in very different amounts - that's expected, but check preserve_luminance if the result suddenly looks inverted from what you designed. And the "Primaries/Secondaries" relationships are the least surprising; the fun (and the fiddliest) ones are Split Complementary and Triadic, where small threshold tweaks change the whole mood. Start there and iterate.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| base_color | STRING | #0000FF | — |
| color_relationship | COMBO | Complementary | 6 options: Primaries, Secondaries, Complementary, Split Complementary, Triadic, Analogous |
| tone_mapping | COMBO | Midtones | 3 options: Highlights, Midtones, Shadows |
| contrast | FLOAT | 1.00.1–2 | — |
| threshold_low | FLOAT | 0.300–1 | — |
| threshold_high | FLOAT | 0.700–1 | — |
| smoothingopt | FLOAT | 0.100–1 | — |
| saturationopt | FLOAT | 1.00–2 | — |
| preserve_luminanceopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |