SVG Color Picker
One color format to rule all the style nodes
- color_hex
- meta
The most boring node in the pack, and the one that saves you the most headaches. SVG Color Picker takes a color in almost any format you can type - #RGB, #RRGGBB, #RRGGBBAA, rgb(), rgba(), or a named color like red - and normalizes it to one consistent #RRGGBBAA string that every other TJ_Vector style node can swallow.
Why this exists
The style editors in this pack are picky in the good way: SVG Style Editor (Simple), SVG To Image, and SVG Group Layout all take hex color strings, and if you hand them rgba(255,0,0,0.5) or a bare name, you're gambling on whether the parser handles it. Color Picker makes the conversion once, in one node, so your colors arrive everywhere in the exact format the downstream nodes expect - with the alpha channel spelled out explicitly. One node upstream, zero "why is this color broken" debugging downstream.
Inputs and outputs
base_color- whatever color you have. It parses hex, rgb()/rgba(), and named colors, then clamps to 0–255.preset- a quick palette dropdown: transparent, white, black, red, green, blue, yellow, cyan, magenta, gray, or none.r_override/g_override/b_override/a_override- per-channel overrides,-1(the default) meaning "keep the parsed value." Want your red at half opacity?base_colorred,a_override128, done. Thea_overridetooltip spells it out: alpha 0–255, -1 keeps parsed.
Outputs: color_hex (the normalized #RRGGBBAA string) and meta (JSON with the parsed R/G/B/A components - handy if you want to read the breakdown programmatically).
The live picker widget
Here's the fun part that isn't obvious from the inputs: this pack ships a JavaScript extension (web/tj_color_picker.js, enabled via WEB_DIRECTORY in the pack's __init__.py) that turns color fields on SVG To Image, SVG Group Layout, SVG Style Editor (Simple), and SVG Color Picker itself into a live color widget - swatch, alpha slider, instant preview, no node execution needed. So in practice you can skip typing hex entirely and just drag a slider on the Color Picker's own widget, then watch the normalized string appear. It's the pack's most polished UI touch, and it makes "pick a color and feed it everywhere" feel almost pleasant.
Install
One package, one install, all nodes included:
cd ComfyUI/custom_nodes
git clone https://github.com/TJ16th/TJ_ComfyUI_Lineart2Vector.git
# restart ComfyUI
or ComfyUI Manager → search TJ_ComfyUI_Lineart2Vector. No models, no keys. One dependency note: the color widget is a frontend JS file, so if the picker never appears, you're probably on a cached or older frontend - hard-refresh your browser tab before suspecting the install. If you cloned manually and skipped requirements.txt, nothing here needs anything exotic; it's all in the stock ComfyUI stack.
Where people get burned
The classic: typing a color that's almost valid and getting a weird value through - the node clamps silently rather than erroring, so out-of-range channels just truncate. And remember -1 is a sentinel on the overrides; typing -1 into a_override isn't "negative alpha," it's "don't touch alpha." If you want a fully transparent color, use a_override 0 or the transparent preset. Finally, the meta output is a string, not a real JSON object - don't try to wire it into a JSON-consuming node without a string-to-JSON step.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| base_color | STRING | #FFFFFFFF | Input color (hex, rgba(), or name) |
| presetopt | COMBO | none | 11 options: none, transparent, white, black, red, green, +5 |
| r_overrideopt | INT | -1-1–255 | — |
| g_overrideopt | INT | -1-1–255 | — |
| b_overrideopt | INT | -1-1–255 | — |
| a_overrideopt | INT | -1-1–255 | Alpha 0-255 (-1 keeps parsed) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| color_hex | STRING | — |
| meta | STRING | — |