Bug 407880 - Color swatch buttons do not return accurate values
Summary: Color swatch buttons do not return accurate values
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Color Selectors (show other bugs)
Version: 4.1.7
Platform: unspecified macOS
: NOR major
Target Milestone: ---
Assignee: vanyossi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-23 20:17 UTC by diefifans
Modified: 2019-07-08 14:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description diefifans 2019-05-23 20:17:10 UTC
SUMMARY

When selecting colors using color swatch buttons in Krita, OSX "Colors" dialogue (which Krita opens to select color) returns inaccurate color values to Krita. This dialogue is the only way to select color via a colorswatch button. 

STEPS TO REPRODUCE
1. Select any color swatch button to open the "Colors" dialogue (via color selector, palette editing pop-up, digital color mixer docker etc.)
2. Select specific color values and note RGB / hex values, click OK and save to palette
3. click newly made color swatch in palette and note RGB/hex values

OBSERVED RESULT

Values will not be the values originally selected.

EXPECTED RESULT

Values translated to Krita should reflect the chosen values in the OSX dialogue considering that for some dockers (digital color mixer) the only way to select colors for mixing is via color swatch buttons.

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

ADDITIONAL INFORMATION

See forum post:
https://forum.kde.org/viewtopic.php?f=139&t=160738
Comment 1 vanyossi 2019-05-31 03:37:26 UTC
I can confirm this happens. the color si selected correctly, as its perceptually identical. but after clicking ok, the color changes from the original color. Once the color has shifted, opening the color selector again an pressing ok will shift the color even further.

tested on master
Comment 2 vanyossi 2019-06-24 03:15:52 UTC
The bug fixed and awating revision 

https://invent.kde.org/kde/krita/merge_requests/52
Comment 3 vanyossi 2019-07-04 17:38:18 UTC
Git commit c7d2b22c437919c0c907fd1c6105f9c03a6ce806 by Ivan Yossi.
Committed on 04/07/2019 at 17:37.
Pushed by ivany into branch 'master'.

Use loaded color colorSpace for QColor transformations

toQColor uses current Color colorSpace to convert which avoids the color
discrepancy after hitting ok on nativeDialog in macOS.

M  +8    -0    libs/ui/widgets/KoDualColorButton.cpp

https://invent.kde.org/kde/krita/commit/c7d2b22c437919c0c907fd1c6105f9c03a6ce806
Comment 4 Halla Rempt 2019-07-08 14:59:29 UTC
Git commit 2ea5cde18b65d2b7b7c743d7abb0cb254519e4e1 by Boudewijn Rempt, on behalf of Ivan Yossi.
Committed on 08/07/2019 at 14:59.
Pushed by rempt into branch 'krita/4.2'.

Use loaded color colorSpace for QColor transformations

toQColor uses current Color colorSpace to convert which avoids the color
discrepancy after hitting ok on nativeDialog in macOS.

M  +8    -0    libs/ui/widgets/KoDualColorButton.cpp

https://invent.kde.org/kde/krita/commit/2ea5cde18b65d2b7b7c743d7abb0cb254519e4e1