ID 481046 - Using the Paint Through Tool with luminance-based Stencil modes produces incorrect colour

Follow

Problem summary
Using the Paint Through Tool with luminance-based Stencil modes produces incorrect colour

Customer reported version
Mari 4.7v2

Customer reported platform
CentOS 7

Steps to reproduce

1) Open any project

2) Import an image into the Image Manager

3) Open the Colors palette and select a dark colour for the foreground colour

4) With the Paint Through Tool active, change the Stencil mode to Luminance or Inverted Luminance

5) Paint on the model

6) Switch to the standard Paint tool and apply some paint to compare the colours

Expected behaviour
The paint should be the same as the selected foreground colour.

Actual behaviour
The paint is brighter than the selected foreground colour.

​​

Workaround
With the image selected, go to Image Manager > MriImage > Colorspace > Scalar Data and tick the Scalar Data checkbox. 

After ticking this checkbox, the correct colour will be produced in luminance-based stencil modes. 

Reproduced by support
This bug has been reproduced in:
Mari 4.7v3 - Windows 10 - CentOS 7.7
Mari 4.7v2 - Windows 10
Mari 4.7v1 - Windows 10
Mari 4.6v1 - Windows 10
Mari 4.5v2 - Windows 10 - CentOS 7.7 - regression

Unable to reproduce bug in:
Mari 4.5v1 - Windows 10 - CentOS 7.7

Earliest version tested
Mari 4.5v1 - This issue doesn't appear in this version and has regressed

    We're sorry to hear that

    Please tell us why