Hue Rotation-Vextra
Recolor a whole batch without re-sampling
- images
- IMAGE
Want the same image in a dozen color schemes? You could re-run the sampler with different prompts, or you could just rotate the hue wheel in one node. Hue Rotation-Vextra takes an image - or a whole batch - and shifts every pixel's hue by however many degrees you tell it. It's a pure post-process recolor that costs a fraction of a second instead of a full generation.
Like Glitch-Vextra and Swap Color Mode, this one started life in diontimmer's Vextra pack and was folded into AegisFlow Utility Nodes after the originals developed import problems. The code here is the working version, self-contained and credited to the original developer.
The mechanism is a proper hue rotation, not a naive hack. PIL doesn't have a "rotate hue" filter, so the pack implements the classic luminance-weighted rotation matrix - a matrix built from the cosine and sine of your angle, applied via PIL's convert('RGB', matrix). Because it weights by luminance, colors travel around the wheel without the brightness of the image collapsing. That's the difference between "recolored" and "ruined."
Inputs are minimal: images (required) and hue_rotation, a float from 0–360 with a 0.1 step. Zero is no change. 180 flips each color to roughly its complement - an orange sky becomes blue, which is a great party trick. 360 is a full loop back to where you started. Since it's a single float and the node loops the whole batch, you can feed it a stack of frames and drive the rotation from elsewhere to animate a slowly shifting palette.
Output is an IMAGE, converted back to RGB on the way out, with the same batch size and dimensions you fed in. Nothing about this node touches the sampler or the model, so it's non-destructive and free to iterate.
The best uses: fixing a color cast that a single hue nudge clears up, generating style-sheet variants of a logo or asset, and color-grading experiments before you commit to changing the prompt. It won't rescue a badly sampled image, but as a cheap recolor it's the fastest dial in this pack.
Install is the standard two-liner:
cd ComfyUI/custom_nodes
git clone https://github.com/aegis72/aegisflow_utility_nodes
Restart ComfyUI, or install via ComfyUI Manager by searching "AegisFlow Utility Nodes." No models, no extra dependencies for this node - it only uses PIL, which ComfyUI already has. If Manager ever flags a conflict with ComfyUI-Vextra-Nodes, that's the shared-class-name false alarm described in the Glitch-Vextra article; ignore it unless you actually have the original pack installed.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| hue_rotationopt | FLOAT | 0.00–360 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |