Style SVG (Remplissage/Contour)
Give your vector shapes a fill and a stroke
- svg_text
- SVG_TEXT
Raw SVG from a converter like DXF to SVG is a plain wireframe: black paths, no fill, no personality. SVG Style is the node that fixes that. It takes any SVG_TEXT, walks every <path> in it, and stamps on a fill color, a stroke color, and a stroke width. It's the difference between a technical diagram and a finished-looking graphic, and it slots right before SVG Preview or SVG Save in your workflow.
How it works
The node parses the SVG with lxml, finds every path element (it only touches paths - groups, rects, circles and other elements are left alone, which is worth remembering if your SVG uses non-path shapes), and sets the style attributes directly:
fill- set to yourfill_coloriffill_enabledis on, ornoneif off.stroke+stroke-width- applied whenstroke_widthis above zero; otherwise stroke is set tonone.
The result is re-serialized and returned as fresh SVG_TEXT. Note it applies one uniform style to every path - there's no per-path control. That's fine for a clean uniform look, which is most of what this node is for.
Inputs that matter
svg_text- the source SVG.fill_enabled(default true) - master switch for the fill.fill_color(default#00A2FF) - the pack's signature blue. Change it to whatever you need.stroke_color(default#000000) andstroke_width(default 1) - the outline. Width 0 disables the stroke entirely.
The defaults are decent but the blue is very much "this is a demo" energy - for a cut-path or plotter workflow you'll likely want fill off and a specific stroke. Think about what the SVG is for before you style it.
Outputs
A single SVG_TEXT output with the styled markup. Wire it into SVG Preview to see the result rasterized, SVG Save to write it out, or SVG Boolean to run geometry operations on the styled shapes.
How to install
Part of the orion4d/ComfyUI_DAO_master pack:
cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/ComfyUI_DAO_master.git
pip install lxml
Restart ComfyUI. No models.
Common issues
If nothing seems to change after styling, the likely reason is your SVG uses shapes other than path - rects, circles, groups - and the node only restyles paths. Also worth knowing: if the input SVG text is empty, the node passes it straight through untouched rather than erroring, which can mask an upstream problem. And since every path gets the same style, don't expect this node to do multi-color SVGs - that's a job for a real editor.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| svg_text | SVG_TEXT | — | |
| fill_enabled | BOOLEAN | true | — |
| fill_color | STRING | #00A2FF | — |
| stroke_color | STRING | #000000 | — |
| stroke_width | FLOAT | 1.0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SVG_TEXT | SVG_TEXT | — |