Nodes/Jovimetrix/CONSTANT (JOV) πŸŸͺ
ComfyUI Node

CONSTANT (JOV) πŸŸͺ

A solid color, a matte, or a background β€” on demand

By AmoranoΒ·Created 3 years agoΒ·Updated 12 months agoΒ· 397
CONSTANT (JOV) πŸŸͺ
  • πŸ‡ΌπŸ‡­
  • 🌈
  • πŸ–ΌοΈ
  • 😷

CONSTANT (JOV) πŸŸͺ makes a solid-color image of a size and color you specify - and then gives you the mask to go with it. In a pack full of flashy compositing tools, this is the quiet utility you'll actually use constantly: a background to composite onto, a color matte to grade against, a resolution-forcing blank, or just a test card while you debug a workflow.

It's the current name for what used to be "Constant (jov)" before Jovimetrix's 2.0 renaming pass - same job, upgraded inputs. The old version used three 0–1 float sliders for R/G/B; this one gives you a VEC4 color with a proper picker.

What it does

Two inputs, two outputs:

  • πŸ‡ΌπŸ‡­ (VEC2, default (512, 512), 32–8192) - the width and height of the output. This is the one you'll set every time.
  • 🌈 (VEC4, default (0, 0, 0, 255), 0–255) - the color, as RGBA in 0–255 space. The 255 alpha default means fully opaque; drop it for a transparent constant. This is the upgrade over the legacy node - a real color input with picker support.

Outputs are πŸ–ΌοΈ image and 😷 mask: the image is your solid color, and the mask is a fully-white matte at the same size. In newer builds the node also accepts an optional input image and mask, letting you matte a chosen color onto an existing image rather than starting from scratch - the README notes "patched constant node to work with MATTE_RESIZE," which is that behavior.

How it works

It allocates a canvas at the requested size, fills it with the color, and generates the corresponding alpha. If you feed it an optional image/mask, it composites the color under that image using the mask - which is how you'd tint or recolor a background without touching the foreground. Pure pixel work, no model, instant.

Installing it

Part of Jovimetrix:

  • ComfyUI Manager - search "Jovimetrix", install.
  • Manual - git clone https://github.com/Amorano/Jovimetrix.git into custom_nodes/, then pip install -r requirements.txt.

No model downloads. Dependencies: numpy, OpenCV (opencv-contrib-python), Pillow, matplotlib, plus the author's cozy_comfyui library from GitHub. Needs ComfyUI 0.1.3+ and a reasonably recent frontend.

Where people get burned

Two things, and they're both about color conventions. First, the 0–255 range: if you type 0.5 in the alpha expecting a 50% constant, you get a 0.5/255 - basically invisible. Use 255 for opaque, 128 for half. Second, if your constant comes out fully black when you expected white, check that you changed all four values - the default is (0,0,0,255), black with full alpha. The mask output is worth grabbing even when you don't need it: it's a ready-made full matte at exactly the constant's size, which is a handy sizing anchor for downstream compositing. It's not a node you'll talk about - it's the node that makes the ones you do talk about possible.

CategoryJOVIMETRIX πŸ”ΊπŸŸ©πŸ”΅/CREATE

Inputs (2)

NameTypeDefaultDescription
πŸ‡ΌπŸ‡­optVEC2512,51232–8192β€”
🌈optVEC40,0,0,2550–255β€”

Outputs (2)

NameTypeDescription
πŸ–ΌοΈIMAGEβ€”
😷MASKβ€”