Nodes/ComfyUI_Element_easy/Empty Image RGB
ComfyUI Node

Empty Image RGB

A solid-color image generator that doesn't make you fight color formats

By supElement·Created 9 months ago·Updated about 11 hours ago· 10
Empty Image RGB
    • IMAGE
    • actual_width
    • actual_height
    width512
    height512
    divisible_by1
    color_code#808080

    EmptyImageRGB makes a solid-color image, and the "RGB" in the name is the point: unlike stock EmptyImage nodes that want you to fiddle with three separate float sliders, this one takes a single color string and figures out the format for you. Type #ff0000 or 255,0,0 and it produces red. That "it just works" convenience is the entire reason the node exists, and it's genuinely nice.

    How it works

    You give it width and height (up to 16384) and a color_code string, and it auto-detects whether the color is a hex code (#ff0000, or a 16-bit hex value) or an RGB tuple. The divisible_by input (1–512, default 1) then snaps the dimensions to a multiple of that number - set it to 8, 16, or 64 and you get dimensions that play nicely with most VAEs and video latent nodes, which is exactly the kind of quiet detail that saves you a failed run.

    The clever part is the outputs. Besides the IMAGE itself, it emits actual_width and actual_height - the real dimensions after the divisible-by rounding. So you can ask for 513×513, have it quietly become 512×512 (or whatever divisible_by snapped it to), and feed the actual values downstream instead of letting a latent node disagree with the image. That's the difference between a tool that works and one you have to babysit.

    When you'd use it

    Solid-color images have more uses than you'd think: a background layer for compositing, a base canvas for outpainting workflows, a color fill to composite behind a masked subject, or just a quick test canvas to check a pipeline end to end. Because the color is a plain string, you can drive it from a text node, a dropdown, or anything that outputs a string - which makes it easy to build color-swatch testers or batch color variants without touching sliders.

    Installing it

    It's part of supElement/ComfyUI_Element_easy:

    cd ComfyUI/custom_nodes
    git clone https://github.com/supElement/ComfyUI_Element_easy.git
    

    Restart ComfyUI, or install via ComfyUI Manager by searching ComfyUI_Element_easy. No models or extra downloads.

    Gotchas

    Two things to keep in mind. First, divisible_by rounding is why actual_width and actual_height exist - always trust the outputs rather than assuming your requested size came out unchanged. Second, if you're using this as the base for outpainting or inpainting, the solid color is only a starting point: you'll still need a mask and a proper inpaint pass, because a flat color field carries no structure for the model to work with.

    CategoryElement_easy/image

    Inputs (4)

    NameTypeDefaultDescription
    widthINT5121–16384
    heightINT5121–16384
    divisible_byINT11–512
    color_codeSTRING#808080支持 #RRGGBB、#RGB、R,G,B 或灰度数值;可用前端色轮/吸管选取

    Outputs (3)

    NameTypeDescription
    IMAGEIMAGE
    actual_widthINT
    actual_heightINT