Primitive Color HSV (MD)
Pick a color by hue, saturation and value — like an actual human
- int
- HEX
Color pickers in every drawing app default to HSV for a reason: humans think in "what hue, how vivid, how bright," not in red/green/blue percentages. mdPrimitiveColorHSV brings that model into your ComfyUI graph. Dial in a Hue, a Saturation and a Value, and it hands you a packed 24-bit integer color plus the #RRGGBB hex string - ready to feed into any node that takes a color as an int.
How it works
The node takes your three values, normalizes them (hue is in degrees 0–360, saturation and value in 0–100%), converts HSV to RGB with the standard cylinder math, clamps, and packs the result as (R << 16) | (G << 8) | B. Same packing scheme as the RGB primitive in this pack, so the int output drops straight into the same color-INT sockets. Rounding and clamping are silent - out-of-range inputs just get pinned.
The inputs and outputs
Hue- 0 to 360 degrees. 0 is red, 120 green, 240 blue, full circle back to red.Saturation- 0 to 100%. 0 is gray, 100 is fully vivid.Value- 0 to 100%. 0 is black, 100 is full brightness.- Output
int- packed color integer (0–16777215). - Output
HEX- the hex string, e.g.#00FF80.
Both outputs are plain values, not images.
Install
Part of MdColorMod, no dependencies, no model downloads:
cd ComfyUI/custom_nodes
git clone https://github.com/MdONeilsl/ComfyUI-MdColorMod
Restart ComfyUI, or install via ComfyUI Manager by searching "MdColorMod".
Where people get burned
The classic beginner move is treating "Value" like a white/black slider and being confused when it darkens and desaturates toward black - that's exactly what HSV Value does; if you want the "same color, lighter or darker" feel, the HSL sibling node in this pack is what you actually want. Also remember hue wraps around: Hue 359 is basically Hue 1, and the node converts straight across, so there's no trap there. And as with all the primitive color nodes, keep the int output pointed at color-INT inputs - it's a number, not a pixel.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| Hue | FLOAT | 0.00–360 | Hue value in degrees (0-360). |
| Saturation | FLOAT | 0.00–100 | Saturation percentage (0-100%). |
| Value | FLOAT | 0.00–100 | Value (brightness) percentage (0-100%). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| int | INT | Packed 24-bit integer color value (0-16777215). |
| HEX | STRING | Hexadecimal color string (e.g., #FF0000). |