π¨ Rennart Color Preview
Paste a pile of hex codes, get a clean swatch grid
- IMAGE
- COLOR_COUNT
Rennart Color Preview is the companion to the pack's Color Palette node, and it solves a small but real problem: seeing color as actual blocks instead of text. You feed it any text containing hex codes - a palette string, a comma-separated list, even a full paragraph of prompt text - and it extracts every #RRGGBB (or shorthand #RGB) and renders them as a grid of swatches on the canvas. If you've ever squinted at #8E44AD in a string widget and wondered whether it was purple or blue, this is your answer.
How it works
There's no machine learning anywhere near this. The node runs a regex over the hex_string input, finds every 6-digit or 3-digit hex code, expands the 3-digit ones to full form, and then lays them out using an "adaptive grid algorithm." That's a fancy name for something simple that the author tuned: up to 3 colors sit in one row, 4 makes a 2Γ2, 8/12/16 use a 4-column layout, and anything else falls into a 3-column grid with short rows balanced so the whole thing looks even instead of ragged. Each swatch is swatch_size pixels (default 128, range 32β512), and the swatches stretch to fill their row width so there are no ugly gaps.
Two outputs come out: IMAGE (the rendered grid) and COLOR_COUNT (an INT telling you how many distinct colors were found). The color count is genuinely useful - it's a quick sanity check that your palette string actually carries the number of colors you think it does, especially after a node upstream reformats it.
The inputs that matter
Just two, and neither is scary:
hex_string- a multiline text box. Paste anything containing hex codes. Note it parses#-prefixed codes only; a bare8E44ADwith no hash won't be picked up, and neither willrgb(142,68,173).swatch_size- pixel size of each swatch. Crank it up if you want to actually inspect the colors on a big monitor.
If the string contains no hex codes at all, the node doesn't error - it quietly renders a single black swatch and reports COLOR_COUNT of 1. That's a deliberate fallback rather than a crash, but it's also easy to misread as "my colors are black," so it's worth remembering when you see an all-black preview.
Install
It's part of the ComfyUI-Rennart pack, so one install covers it:
# ComfyUI Manager: search "ComfyUI-Rennart", or:
cd ComfyUI/custom_nodes
git clone https://github.com/Rennart2025/ComfyUI-Rennart
Restart ComfyUI and it shows up under the Rennart menu. No models, no extra pip packages beyond torch/numpy, no keys.
Where it fits
The natural flow is Color Palette β Color Preview: wire VARIATIONS_HEX or HEX_STRING from the palette node straight into hex_string here and you get a visual swatch board of the exact colors you're about to pass into a prompt or a JSON payload. You can also use it as a standalone checker for any hex list you have lying around in a note node. It's a tiny utility, and that's the point - it's the kind of node you forget exists until the moment it saves you from pasting hex codes into a browser tab to check them.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| hex_string | STRING | β | |
| swatch_size | INT | 12832β512 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |
| COLOR_COUNT | INT | β |