Nodes/comfyui-fvmtools/Prompt Color Replace
ComfyUI Node

Prompt Color Replace

Replaces color placeholder tags in a prompt with actual color names from a palette. Supported tags: Numbered: #color1# - #color8# (or #c1# - #c8#) Semantic: #primary# #secondary# #accent# #neutral# #metallic# Short: #pri# #sec# #acc# #neu# #met# Connect palette_string from Color Palette Generator or type manually. Semantic override inputs take precedence over palette positions.

By ping1979ping·Created 5 months ago·Updated 2 months ago· 0
Prompt Color Replace
    • prompt
    • replacements_log
    prompt
    palette_string
    primary
    secondary
    accent
    neutral
    metallic
    fallback_colorblack
    strip_hyphenstrue
    CategoryFVM Tools/Color

    Inputs (9)

    NameTypeDefaultDescription
    promptSTRINGText with color placeholder tags to replace. Supported tags: #color1# to #color8# (or #c1# to #c8#) — by palette position #primary# #secondary# #accent# #neutral# #metallic# — by role #pri# #sec# #acc# #neu# #met# — short aliases Connect the outfit_prompt from Outfit Generator, or write manually. Tags are case-insensitive.
    palette_stringSTRINGComma-separated color names from Color Palette Generator. Position mapping: 1st color = #color1# = #primary# 2nd color = #color2# = #secondary# 3rd color = #color3# = #accent# 4th color = #color4# = #neutral# 5th color = #color5# = #metallic# 6th-8th = #color6# to #color8# Connect palette_string output from Color Palette Generator.
    primaryoptSTRINGOverride the primary role color. Takes precedence over the palette_string position. Connect from Color Palette Generator's 'primary' output.
    secondaryoptSTRINGOverride the secondary role color. Takes precedence over the palette_string position. Connect from Color Palette Generator's 'secondary' output.
    accentoptSTRINGOverride the accent role color. Takes precedence over the palette_string position. Connect from Color Palette Generator's 'accent' output.
    neutraloptSTRINGOverride the neutral role color. Takes precedence over the palette_string position. Connect from Color Palette Generator's 'neutral' output.
    metallicoptSTRINGOverride the metallic role color. Takes precedence over the palette_string position. Connect from Color Palette Generator's 'metallic' output.
    fallback_coloroptSTRINGblackColor used when a tag has no matching palette color. Default: 'black'. Used if palette has fewer colors than tags referenced.
    strip_hyphensoptBOOLEANtrueConvert hyphenated colors to spaces. ON: navy-blue → navy blue (better for SD/SDXL prompts) OFF: keep navy-blue as-is (useful if your model expects hyphens)

    Outputs (2)

    NameTypeDescription
    promptSTRING
    replacements_logSTRING