ComfyUI-ColorBias
CONDITIONING Color Bias Node for ComfyUI
ComfyUI Color Bias
<img width="614" height="819" alt="output" src="https://github.com/user-attachments/assets/77404798-5290-40f7-b245-8e7daf7cfdab" />Color Bias is a custom ComfyUI node that does two things at once:
- Adds color-focused text conditioning to an existing
CONDITIONINGinput. - Builds a palette-based
LATENTthat can be sent toKSampler.
The node is designed to steer color without requiring a separate image reference node. For models such as Anima, SD15, or SDXL (and variants of it - illustrious, noobai) that have a strong connection between color conditioning and the latent space, this can be a powerful way to achieve more vibrant and accurate colors in your generations.
Node
<img width="365" height="759" alt="204858" src="https://github.com/user-attachments/assets/15a9e5a0-e53d-4cbf-b847-25653c744b26" />Display name: Color Bias
Outputs:
conditioning: the original conditioning plus additional color conditioning.latent: a generated palette latent adapted to the connected model's latent format.
Required Inputs
conditioning
Base positive or negative conditioning that you want to modify.
model
clip
vae
bypass
Boolean switch.
False: normal behavior.True: skips all color processing, returns the original conditioning unchanged, and returns a neutral non-colored latent.
active colors
How many color slots are active.
Valid range: 1 to 5.
Only the first N color inputs are used.
global influence
Overall strength of the added color conditioning.
- Lower values: weaker color push.
- Higher values: stronger color push.
0.0: keeps the original conditioning unchanged, but the node still returns the generated latent.0.5: the default value, provides a nice balance in most cases.
batch size
How many palette samples to generate in one batch.
This affects the size of the returned latent batch.
width
Width of the generated palette image before VAE encoding.
Higher values increase cost and memory use.
height
Height of the generated palette image before VAE encoding.
Higher values increase cost and memory use.
latent
Palette generation mode if you need extra color conditioning.
Available modes:
noise: creates a noisy palette made from the selected colors.vertical: creates vertical color bands. (experimental, may be less efficient thannoise)horizontal: creates horizontal color bands. (experimental, may be less efficient thannoise)
color 1,2,3,4,5
Color in hex form from the ComfyUI color picker.
strength 1,2,3,4,5
Relative weight of each color.
This affects both:
- how strongly the color contributes to the generated palette latent,
- how strongly the color contributes to the added color conditioning.
Output Details
conditioning
Returns a CONDITIONING object built from:
- the original input conditioning,
- one additional color-conditioning entry per active color.
Each added entry is generated from a color description derived from the hex value. The node tries to use webcolors first for exact named colors and falls back to hue-based naming if no exact CSS-style name is available.
latent
Returns a LATENT dictionary with encoded samples.
The latent is generated from a synthetic palette image and then adapted to the connected model's latent format. This is useful for models with non-standard latent channel counts.
If bypass=True, the returned latent is neutral gray rather than colorized.
Typical Workflow
- Connect your positive conditioning into
conditioning. - Connect the same
model,clip, andvaethat you use in the rest of your workflow. - Pick 1 to 5 colors.
- Adjust
strengthvalues to control the palette balance. - Send the node's
conditioningoutput into thepositiveinput ofKSampler. - Send the node's
latentoutput into thelatent_imageinput ofKSampler.
Performance Notes
- Large
widthandheightvalues make the node slower. - Larger
batch sizeincreases memory use and processing time. - More active colors means more CLIP conditioning work.
noisemode is heavier than simple banded layouts, even with optimization.
Installation
Git clone this repository to ComfyUI custom_nodes folder, then restart ComfyUI.
This node depends on:
webcolors