HueShift

HueShift transforms the input image’s colorspace. It works by transforming the colors to CIE XYZ space and then doing simple scales and rotates on the space. In XYZ space, X and Z control the color and Y is the brightness.

Inputs and Controls

Connection Type

Connection Name

Function

Input

unnamed

The image sequence to hue shift.

mask

An optional image to use as a mask. By default, the shift is limited to the non-black areas of the mask.

At first, the mask input appears as triangle on the right side of the node, but when you drag it, it turns into an arrow labeled mask. If you cannot see the mask input, ensure that the mask control is disabled or set to none.

Control (UI)

Knob (Scripting)

Default Value

Function

HueCorrect Tab

channels

channels

rgb

The shift is only applied to these channels.

If you set this to something other than all or none, you can use the checkboxes on the right to select individual channels.

input graypoint

ingray

0.25

After converting to CIE XYZ space, the colors are skewed so that this gray color is X = Z = 0.

output graypoint

outgray

0.25

After all other operations are completed, the CIE XYZ space is skewed to the output gray point so a fully desaturated images is tinted the specified color.

overall saturation

saturation

1

Multiplies X and Z by the specified overall saturation value.

color axis rgb

color

1, 0, 0

Adjusts the saturation in one direction in the XZ plane by setting this color axis. Adjust the saturation along axis control to affect the saturation.

saturation along axis

color_saturation

1

Adjusts the color saturation in the direction specifed by the color axis control.

hue rotation

hue_rotation

0

Adjusts the rotation around the Y axis, which is mostly useful for making psychedelic effects.

brightness

brightness

1

Multiplies the image by the specified value.

mask

N/A

disabled

Enables the associated mask channel to the right. Disabling this checkbox is the same as setting the channel to none.

maskChannelInput

none

The channel to use as a mask. By default, the correction is limited to the non-black areas of this channel.

inject

inject

disabled

Copies the mask input to the predefined mask.a channel. Injecting the mask allows you to use the same mask further downstream.

invert

invert_mask

disabled

Inverts the use of the mask channel so that the correction is limited to the non-white areas of the mask.

fringe

fringe

disabled

When enabled, only apply the effect to the edge of the mask.

When disabled, the effect is applied to the entire mask.

(un)premult by

N/A

disabled

Enables the associated channel to the right. Disabling this checkbox is the same as setting the channel to none.

unpremult

none

The image is divided by this channel before being processed, and multiplied again afterwards.

If you are using premultiplied input images, you may want to check (un)premult by and select rgba.alpha here. This will simulate applying the correction before the premultiplication was done. It is the same as adding an Unpremult node before this node and a Premult node after, but allows you to work faster if you’re only using one HueShift node.

If you are using unpremultiplied input images, you should leave this set to none.

invert

invert_unpremult

disabled

Inverts the use of the (un)premultiply channel.

mix

mix

1

Dissolves between the original image at 0 and the full shift at 1.