ID 337133 - The Colorspace node's HSL implementation is incorrect when multiplied by a constant.

Follow

Problem summary
Colorspace node's Hue, Saturation, and Luminance implementation is incorrect. HSL should be affected by luminance changes however they should not be affected when the input is multipled by a constant. 



Customer reported version
nuke.n/a

Customer reported platform

Steps to reproduce

1) Launch Nuke and paste the following script. 
set cut_paste_input [stack 0]
version 10.5 v1
ColorWheel {
inputs 0
gamma 0.45
name ColorWheel3
selected true
xpos 1161
ypos -116
}
Grade {
white 0.0001
name Grade6
selected true
xpos 1161
ypos -44
}
Colorspace {
colorspace_out HSL
name Colorspace3
selected true
xpos 1161
ypos -20
}

2) Delect a value on the colorwheel (cmd/ctrl + left click) and note the H, S, and V values. 

3) With your viewer connected to the Colorspace node toggle the Grade (Select the node and press the "D" key) node on and off note that the values change. The values should not be affected as the input values are being multiplied by a constant. 

Workaround
Unknown.

Reproduced by support
This bug has been reproduced in:

11.1v2 - CentOS 7.4 - MacOSX 10.13 - Windows 7
11.1v1 - CentOS 7.4
11.0v4 - CentOS 7.4
11.0v1 -CentOS 7.4 
10.5v7 - CentOS 7.4
10.5v1 - CentOS 7.4
10.0v6 - CentOS 7.4
10.0v1 - CentOS 7.4
9.0v9 - CentOS 7.4
9.0v1 - CentOS 7.4
8.0v7 - CentOS 7.4
8.0v1 - CentOS 7.4
7.0v10 - CentOS 7.4 - MacOSX 10.13 - Windows 7

Earliest version tested
Nuke 7.0v10

Expected behaviour
With HSL the Hue and Saturation should be affected by luminance changes. As a result the Linear to HSL conversion of the colorspace node should not affect them if the input is multiplied by a constant such as the Grade node.

Actual behaviour
The Linear to HSL conversion is incorrect as it is affected by luminance changes. 

    We're sorry to hear that

    Please tell us why