π¨ Palette Color Align
Drag one palette toward another's mood
- palette
- target_align
- palette
Color coherence in animation usually means "keep frame 40 looking like frame 1." Palette Color Align [Dream] is the tool for steering that - it takes your palette and shifts it toward a target palette by a controllable amount, like dragging one color identity closer to another. The README's description is precise: at an alignment_factor of 0.5 the result is nearly an average of the two palettes, at 0 nothing happens, and at 1 you land close to the target. Above 1 you overshoot past it. One slider, and you've got a "how much does this look like the target" dial.
The mechanism, from the source, is a per-channel average shift. It computes the average red, green, and blue of both palettes, then moves every pixel in your palette by (target_average β source_average) Γ factor, clamped to valid color range. That's a global color-cast operation, not a per-pixel matching - which is exactly right for the use case, because you're adjusting the feel of a palette, not doing fine color correction.
The inputs that matter
- palette - your source
RGB_PALETTE(the one you want to change). - target_align - the
RGB_PALETTEyou're moving toward. Sample it from a reference image with Sample Image as Palette. - alignment_factor - 0 to 10, default 0.5. 0 = no change, 0.5 β average, 1 = close to target, above 1 = overshoot.
Output is a single palette - the shifted result, ready to feed Noise from Palette or any downstream color consumer.
Installing it
Part of Dream Project Animation Nodes - ComfyUI Manager (search "Dream Project Animation Nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/alt-key-project/comfyui-dream-project.git
cd comfyui-dream-project
pip install -r requirements.txt
Restart ComfyUI. The numpy<2.0 pin is the usual install quirk.
Common issues
Two things trip people up. First, it's a cast-shift, not a histogram match - if your palettes have wildly different brightness, the shift can clamp colors to the extreme (that's the overshoot behavior, not a bug). Second, batch alignment: palettes align pairwise, so palette[i] aligns to target[i]; mismatched batch sizes give you alignment on the overlap. If you want per-channel multiplication instead of an additive shift, that's the pack's Palette Color Shift. And the pack-wide note: the README says it's unmaintained, but this node runs fine on current ComfyUI.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| palette | RGB_PALETTE | β | |
| target_align | RGB_PALETTE | β | |
| alignment_factor | FLOAT | 0.50β10 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| palette | RGB_PALETTE | β |