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.
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.
Base positive or negative conditioning that you want to modify.
Boolean switch.
False: normal behavior.True: skips all color processing, returns the original conditioning unchanged, and returns a neutral non-colored latent.
How many color slots are active.
Valid range: 1 to 5.
Only the first N color inputs are used.
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.
How many palette samples to generate in one batch.
This affects the size of the returned latent batch.
Width of the generated palette image before VAE encoding.
Higher values increase cost and memory use.
Height of the generated palette image before VAE encoding.
Higher values increase cost and memory use.
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 in hex form from the ComfyUI color picker.
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.
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.
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.
- 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.
- 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.
Git clone this repository to ComfyUI custom_nodes folder, then restart ComfyUI.
This node depends on:
webcolors