SVG Theme Colorizer
Rebrand your whole SVG with one theme dropdown
- STRING
Where SVG Color Replacer needs you to build an exact mapping, SVG Theme Colorizer does the thinking for you: it looks at every color in your SVG and remaps the whole palette onto a theme. Pick pastel_theme and your harsh traced colors soften; pick vibrant_theme and everything pops. It's the "mood" node - the one you reach for when you don't have a specific recolor in mind, just a direction.
How it works
The theme dropdown is populated from JSON files in the pack's themes folder (shipped: monochrome, nature, pastel, vibrant). The mechanism is a two-step remap: extract every unique fill color from the SVG, then for each one find the closest color in the theme's palette and swap it in. Because it's closest-color matching rather than rule-based, it works on SVGs you've never seen - you don't need to know what colors are in there first, which is the entire point.
Under the hood it reuses the same extraction and replacement machinery as the other color nodes, so the same caveat applies: only standard 7-character hex colors get themed. If your SVG uses rgb() or named colors, they pass through untouched.
One input you'll actually set (svg_string and the theme dropdown), one STRING output. That's the whole node - it's deliberately frictionless.
Install
Pack standard:
cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/svg-suite
pip install -r requirements.txt
Restart ComfyUI, or via Manager under "svg-suite". No special dependencies.
Where people get burned
The closest-color approach has a tell: if the theme's palette is small (a monochrome theme has maybe three shades), wildly different source colors collapse onto the same target, flattening your contrast. A colorful SVG run through monochrome_theme can turn into a single flat gray shape with no detail. That's expected behavior, not a bug - but check the preview before you commit.
Second, the hex-only limitation is real on hand-authored SVGs. And as with every color node in this pack, if something goes wrong it prints to the console and returns your original SVG unchanged - a missing theme file, a parse error, all of it looks like "nothing happened." When in doubt, read the console. But for the normal case - a traced SVG full of hex fills that you want to unify under one aesthetic - this node is a one-click rebrand.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| svg_string | STRING | — | |
| theme | COMBO | pastel_theme | 4 options: monochrome_theme, nature_theme, pastel_theme, vibrant_theme |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |