Nodes/ComfyUI Layer Style/LayerUtility: Color Name
ComfyUI Node Runs on cloud

LayerUtility: Color Name

Color Name — turn a hex color into a word

By chflame163·Created 3 years ago·Updated 8 days ago· 3,118
LayerUtility: Color Name
    • color_name
    â—„color#000000â–º
    ◄palette▾►

    Takes a hex color and gives you back a human word for it - "burnt orange" instead of #CC5500. Small node, but it fills a real gap: most of ComfyUI's color tooling moves in the other direction (pick a color, get a hex value), and there's no built-in way to go from "here's a swatch" to "here's what I'd call it in a sentence." This node does that lookup.

    Where it's actually useful: auto-generating a caption or prompt fragment that references a color by name instead of a code (useful for captioning training data, or building a prompt from a sampled palette), labeling color swatches in a UI, or just sanity-checking that a hex value you computed programmatically is roughly the color you meant.

    How it works

    You give it a hex color and pick a palette - the naming dictionary it looks the color up against. It finds the closest named entry in that palette and returns the name as a string. Six palettes are on offer: xkcd (the large, informal color-name survey the internet knows for names like "dusty rose"), wiki_color, css4 and css3 (the standard web color-name sets), html4 (the small, original HTML named-color list), and flux_sdxl - a palette that stands out from the rest because it's clearly tuned to how people actually phrase colors in Flux/SDXL prompts, rather than a formal CSS or dictionary name. If you're generating names to feed back into a prompt, flux_sdxl is the one worth starting with; if you want a name a designer would recognize, css4 or wiki_color are the safer picks.

    The inputs and outputs that matter

    • color (hex string, default #000000) - the swatch you're naming.
    • palette - which naming dictionary to use: xkcd, wiki_color, flux_sdxl, css4, css3, html4.

    Output: a single color_name string.

    How to install it

    Ships with the ComfyUI Layer Style pack. ComfyUI Manager - search ComfyUI Layer Style, install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/chflame163/ComfyUI_LayerStyle
    pip install -r ComfyUI_LayerStyle/requirements.txt
    

    then restart. Lives under 😺dzNodes → LayerColor. No model download - it's a lookup against a bundled color table, not an inference step.

    Common issues & troubleshooting

    The name feels off or too generic. Every palette here is a nearest-match lookup against a finite list, not a perfect description - a color that sits between two named entries will just snap to whichever is closest. If the result feels wrong, try a different palette; xkcd's much larger name set often gets closer to an intuitive read than the smaller, formal CSS lists.

    Name doesn't read naturally in a prompt. Swap to flux_sdxl - the other palettes are built for design/dev contexts (CSS class names, HTML color keywords) and can produce a name that's technically correct but awkward as prompt text.

    Node's not in your list. Pack import failure, not this node - LayerStyle's dependency chain is long, and a broken transformers/TensorFlow pairing is the classic way the whole pack fails to load together, taking every LayerStyle and LayerUtility node down with it. Check the startup console or hit "Try Fix" in Manager before assuming this specific node is broken.

    Category😺dzNodes/LayerColor

    Inputs (2)

    NameTypeDefaultDescription
    colorSTRING#000000—
    paletteCOMBO6 options: xkcd, wiki_color, flux_sdxl, css4, css3, html4

    Outputs (1)

    NameTypeDescription
    color_nameSTRING—