Nodes/Basix Image Filters/Rotate Hue (HSV)
ComfyUI Node

Rotate Hue (HSV)

The same color wheel, wearing a different label

By maludwig·Created 2 years ago·Updated about a year ago· 6
Rotate Hue (HSV)
  • image
  • mask_opt
  • image
masked_areatrue
degrees15

Rotate Hue (HSV) spins every color in the image around the color wheel, and before we go anywhere, the honest truth: this is the same operation as the pack's Rotate Hue (HSL). Hue is the same channel in both color spaces, so rotating it runs identical math. The author's README admits as much - "honestly I think this might be the exact same thing." So why would you use this one instead? Because if you're already in the HSV half of the pack, it keeps your node names consistent, and it costs nothing. The behavior is the behavior: red becomes cyan at 180 degrees, blue becomes yellow, and everything in between shifts too.

How it works

Convert the image to HSV, add degrees / 360 to the hue channel, wrap modulo 1.0 so the rotation loops cleanly, convert back to RGB. Because hue is a circle, 360 degrees is a no-op and 180 flips to complement colors. The value and saturation channels aren't touched directly, so the image keeps its brightness and vividness - it's the colors that move, not the lighting. That's what makes hue rotation different from every other node in this pack: it's a pure recolor, and a powerful one.

The inputs that matter

  • image - any IMAGE tensor.
  • degrees (default 15, range −360 to 360, step 5) - the rotation amount. 15–45 is subtle grading; 90 is a dramatic shift; 180 flips to complement colors; negative values spin the other way.
  • masked_area + optional mask_opt - the pack's standard masking.

Output: one image tensor.

Where it bites

The exact same caution as the HSL version, because it's the exact same tool: a full-image hue rotation moves skin tones, foliage, sky - everything. The README's LoRA example (green shirts render great, red shirts don't, so rotate green→red to match the model's training) comes with the warning that the person wearing the shirt recolors too. The mask input exists precisely for this. Make a mask in ComfyUI's MaskEditor (right-click a Preview Image node → Copy (Clipspace), paste into a Load Image node, right-click → Open in MaskEditor), plug it into mask_opt, and toggle masked_area between modify_masked and modify_unmasked to rotate just the shirt, or everything except the shirt.

The other trap is over-rotation. At 180 degrees this node will happily give you technicolor nightmares if the source wasn't built for it. For most grading you'll live in the small-degrees range; big rotations are deliberate.

Installing it

ComfyUI Manager → search "Basix Image Filters" (repo basix_image_filters) → install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/maludwig/basix_image_filters

Restart after. No models, no keys, no heavy dependencies - pure torch math.

Putting it to work

Hue rotation is the best img2img hint in the pack. Rotate your reference, feed it back through the sampler at 0.7–0.9 denoise, and the model tends to follow the recolored direction instead of reverting to the color habits baked into its training. It also stands alone as a color-correction tool - rotating a few degrees toward magenta to fix a green cast is a classic white-balance move you can now do without leaving ComfyUI.

CategoryImage Filters

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
masked_areaBOOLEANtrue
degreesFLOAT15-360–360
mask_optoptMASK

Outputs (1)

NameTypeDescription
imageIMAGE