Bug 437270

Summary: Advance color selector doesn't properly display colors after using colorize from HSV adjustment tab.
Product: [Applications] krita Reporter: Jose <pasche1917>
Component: Color SelectorsAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: minor CC: ahab.greybeard
Priority: NOR Keywords: regression
Version First Reported In: 4.4.3   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: HSV-filter effect demo .kra file
HSV-filter effect demo .png exported

Description Jose 2021-05-17 18:34:15 UTC
SUMMARY
Advance color selector doesn't properly display colors after using colorize from HSV adjustment tab. It only happens with red Hue.

STEPS TO REPRODUCE
1. Create new layers for each color
2. Pick any layer and open the HSV/HSL adjustment Tab.
3. Check "Colorize" and only increase saturation. Apply changes.
4. Use color picker to choose any color from another layer, then use color picker on the layer where colorize was applied.

OBSERVED RESULT

Advance color selector wrongly displays the hue from the colorize layer, keeping the hue from the previous layer.


EXPECTED RESULT

Advance color selector should properly display the hue of the current layer after using color picker on it.


SOFTWARE/OS VERSIONS
Windows: 10 Home
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

Krita

 Version: 4.4.3
 Languages: en_US, en, en_US, en, en_US, en, en_US, en, en_US, en, en_US, en, en_US, en, en_US, en, es_ES, es, en_US, en
 Hidpi: true

Qt

  Version (compiled): 5.12.9
  Version (loaded): 5.12.9

OS Information

  Build ABI: x86_64-little_endian-llp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: winnt
  Kernel Version: 10.0.19041
  Pretty Productname: Windows 10 (10.0)
  Product Type: windows
  Product Version: 10

OpenGL Info
 
  Vendor:  "Google Inc." 
  Renderer:  "ANGLE (Intel(R) HD Graphics 630 Direct3D11 vs_5_0 ps_5_0)" 
  Version:  "OpenGL ES 3.0 (ANGLE 2.1.0.57ea533f79a7)" 
  Shading language:  "OpenGL ES GLSL ES 3.00 (ANGLE 2.1.0.57ea533f79a7)" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  Current format:    QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile) 
     Version: 3.0
     Supports deprecated functions false 
     is OpenGL ES: true 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsAngleD3D11: true 
  isQtPreferAngle: true 

Hardware Information

  GPU Acceleration: auto
  Memory: 16268 Mb
  Number of Cores: 8
  Swap Location: C:/Users/jose_/AppData/Local/Temp

Current Settings

  Current Swap Location: C:/Users/jose_/AppData/Local/Temp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 30
  Use OpenGL: true
  Use OpenGL Texture Buffer: true
  Use AMD Vectorization Workaround: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 900
  Use Backup Files: true
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: false
  Levels of Detail Enabled: true
  Use Zip64: false


Display Information
Number of screens: 1
	Screen: 0
		Name: \\.\DISPLAY1
		Depth: 32
		Scale: 1
		Resolution in pixels: 1920x1080
		Manufacturer: 
		Model: 
		Refresh Rate: 60

Current Settings

  Current Swap Location: C:/Users/jose_/AppData/Local/Temp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 30
  Use OpenGL: true
  Use OpenGL Texture Buffer: true
  Use AMD Vectorization Workaround: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 900
  Use Backup Files: true
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: false
  Levels of Detail Enabled: true
  Use Zip64: false
Comment 1 Ahab Greybeard 2021-05-18 09:28:15 UTC
Created attachment 138531 [details]
HSV-filter effect demo .kra file

I can confirm this behaviour for the 4.4.3 and the May 17 5.0.0-prealpha (git 6e3a7c7) appimages.
It's a recent regression because 4.4.2 does not show this behviour.

It's a 'cosmetic' effect in the Advanced Colour Selector. The Specific Colour Selector and the foreground colour icon on the Toolbar show the correct colour.
The Advanced Colour Selector shows the correct SV dot location in the SV triangle but the triangle colour tone becomes 'locked' to a previous non-HSV-processed colour sample (or it doesn't update for an HSV-processed colour sample).

It happens with the Colour Selector Tool and the Ctrl+click selector.

When using the HSV filter with the Colourise option, the Saturation slider should be set to about 50 (not critical) and the Hue slider must be left at 0. If Hue is set to 1 or more, the effect does not happen.

The effect persists after saving the image as a .kra file and opening the .kra file.
Strangely, the effect is also seen in an exported .png file if that is opened and sampled.

I attach a .kra file and its exported .png image for demonstration purposes.
The red toned lines at the top were produced using the HSV filter as described above on a set of various coloured lines.
The coloured lines below were painted on afterwards.
Comment 2 Ahab Greybeard 2021-05-18 09:29:35 UTC
Created attachment 138532 [details]
HSV-filter effect demo .png exported
Comment 3 Ahab Greybeard 2021-05-18 09:50:10 UTC
Additional note:
Sampling the red toned lines then painting into another open image, the painted lines show the same effect.
So it may be that the exact Hue (0) is the cause of this.
Comment 4 Ahab Greybeard 2021-05-29 09:50:31 UTC

*** This bug has been marked as a duplicate of bug 437625 ***