Mix colors
RGB gives you brown, HSV gives you fire. Choose wisely
- color_a
- color_b
- mixed_color
Mix colors is the pack's answer to "what happens if I blend these two?" You feed it two PIXEL_COLORs and a ratio, and it returns a single blended color - but the twist is the color_space dropdown, and that dropdown is the entire game. Blend red and green in RGB and you get a murky brown. Blend the same two in HSV and you get the yellow-orange fire ramp your intuition was expecting. Same colors, same ratio, completely different art.
The reason is worth internalizing because it applies to every mixing and gradient node in this pack. RGB mixing is linear on each channel, which is simple and predictable but cuts straight through the middle of the color cube - that's the mud zone. HSV mixing converts to hue/saturation/value, interpolates the hue along the shortest path around the color wheel (with proper wraparound for things like red→magenta), then converts back. It follows how artists actually think about color, which is why HSV is usually the right default for skin tones, foliage, and anything with a "temperature."
How it works
The node constructs a new PixelColor from color_a's channels, then temporarily switches it into the requested color space via a context manager and calls mix_with(color_b, ratio). ratio=0.0 returns all of color_a; ratio=1.0 returns all of color_b; 0.5 is a 50/50 blend. Channel values are clamped to 0–255, so extreme inputs don't blow up. The color's name carries over from color_a.
Inputs and outputs
color_a,color_b(PIXEL_COLOR) - the two to blend.ratio(FLOAT, 0.0–1.0, default 0.5).color_space-rgborhsv.
Output: mixed_color, a single PIXEL_COLOR. Chain it into another Mix Colors to do multi-way blends, or feed it to Color to image to actually see it.
Installing
Part of the Pixel Palette Art pack. ComfyUI Manager → "Pixel Palette Art", or:
cd ComfyUI/custom_nodes
git clone https://github.com/ranska/pixel_palette_art.git
Restart ComfyUI; it's under pixel_art/colors. Just Pillow - nothing heavy.
Common issues
The RGB-mud surprise is the #1 complaint, and it's not a bug - it's linear interpolation being honest. If your blend looks desaturated and dull, flip to HSV before you blame the node.
Second: HSV isn't a silver bullet. When your two colors have very different saturation or value, HSV interpolation can swing through a low-saturation middle, which looks washed out. There's no perfect space; the practical approach is to build the blend in both, compare in Color to image, and pick the one that reads right. And the usual pack gotcha: the output is an object, not a render - you need a preview node to see what you mixed.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| color_a | PIXEL_COLOR | Première couleur à mélanger | |
| color_b | PIXEL_COLOR | Deuxième couleur à mélanger | |
| ratio | FLOAT | 0.500–1 | Ratio du mélange (0.0 = tout color_a, 1.0 = tout color_b) |
| color_space | COMBO | rgb | Espace colorimétrique utilisé pour le mélange |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mixed_color | PIXEL_COLOR | — |