Bug 491633 - Colour Picker not picking true colour
Summary: Colour Picker not picking true colour
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: colour-management (other bugs)
Version First Reported In: 6.1.4
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 496155 502645 504606 505667 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-08-12 17:07 UTC by Kye
Modified: 2025-06-16 22:17 UTC (History)
7 users (show)

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


Attachments
video ref (141.75 KB, video/mp4)
2024-08-12 17:07 UTC, Kye
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kye 2024-08-12 17:07:50 UTC
Created attachment 172549 [details]
video ref

SUMMARY
The Colour picker appears to be picking a slightly off colour (see attachment)

STEPS TO REPRODUCE
1. Launch KColorChooser
2. Pick a colour 
3. Compare it with the colour's known value

OBSERVED RESULT
Color is slightly off

EXPECTED RESULT
Color is correct

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.10.3-zen1-2-zen (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 9 4900H with Radeon Graphics
Memory: 15.0 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 1 Leia 2024-11-14 16:50:52 UTC
can also reproduce it here on plasma 6.2.3
seems to be a kwin bug not kcolorchooser since it affects the plasma color picker applet too, and both use the same kwin function

Operating System: Arch Linux 
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.11.7-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 4600G with Radeon Graphics
Memory: 14.9 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: ASUS
Comment 2 Nate Graham 2025-05-21 16:37:32 UTC
*** Bug 496155 has been marked as a duplicate of this bug. ***
Comment 3 Bug Janitor Service 2025-05-21 23:06:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7658
Comment 4 Zamundaaa 2025-05-21 23:10:31 UTC
Depending on the color profile, night light or HDR, it can still fail to round-trip perfectly with that MR, but I think it's the best we can do right now and should be quite close to perfect in most cases.
The remaining edge cases will probably require re-rendering the scene directly in sRGB (which the color picker returns), which is a bit too expensive for my taste - once we can properly do 1x1px viewports even with fractional scales, we can revisit that.
Comment 5 Zamundaaa 2025-05-22 12:25:11 UTC
Git commit c2d6b79ed5c8f59f5ff003f069de26cc6ef89a50 by Xaver Hugl.
Committed on 22/05/2025 at 11:55.
Pushed by zamundaaa into branch 'master'.

plugins/colorpicker: round the result

Otherwise it gets clipped, which means the tiniest of rounding errors can
change the 8 bit result.

M  +1    -1    src/plugins/colorpicker/colorpicker.cpp

https://invent.kde.org/plasma/kwin/-/commit/c2d6b79ed5c8f59f5ff003f069de26cc6ef89a50
Comment 6 Zamundaaa 2025-05-22 12:25:19 UTC
Git commit 686a626a3abb74c382351cda36c81bcacc5a5669 by Xaver Hugl.
Committed on 22/05/2025 at 11:55.
Pushed by zamundaaa into branch 'master'.

plugins/colorpicker: use BPC when converting to sRGB

It's how most applications present to the screen; without BPC the roundtrip of
picking an sRGB color off the screen may not work out

M  +1    -1    src/plugins/colorpicker/colorpicker.cpp

https://invent.kde.org/plasma/kwin/-/commit/686a626a3abb74c382351cda36c81bcacc5a5669
Comment 7 Zamundaaa 2025-05-22 12:51:07 UTC
Git commit cfd044a3f2c55c83df86bae5b065352199dc3069 by Xaver Hugl.
Committed on 22/05/2025 at 12:28.
Pushed by zamundaaa into branch 'Plasma/6.3'.

plugins/colorpicker: round the result

Otherwise it gets clipped, which means the tiniest of rounding errors can
change the 8 bit result.

M  +1    -1    src/plugins/colorpicker/colorpicker.cpp

https://invent.kde.org/plasma/kwin/-/commit/cfd044a3f2c55c83df86bae5b065352199dc3069
Comment 8 Zamundaaa 2025-05-22 12:51:15 UTC
Git commit 2d70fe6248591bda75e7fba2d07cd80e3eec3d72 by Xaver Hugl.
Committed on 22/05/2025 at 12:28.
Pushed by zamundaaa into branch 'Plasma/6.3'.

plugins/colorpicker: use BPC when converting to sRGB

It's how most applications present to the screen; without BPC the roundtrip of
picking an sRGB color off the screen may not work out

M  +1    -1    src/plugins/colorpicker/colorpicker.cpp

https://invent.kde.org/plasma/kwin/-/commit/2d70fe6248591bda75e7fba2d07cd80e3eec3d72
Comment 9 Zamundaaa 2025-05-22 13:29:38 UTC
Git commit b53c58b4e90e2bc4ed28a052bb772eceaf9e04f7 by Xaver Hugl.
Committed on 22/05/2025 at 12:29.
Pushed by zamundaaa into branch 'Plasma/6.4'.

plugins/colorpicker: use BPC when converting to sRGB

It's how most applications present to the screen; without BPC the roundtrip of
picking an sRGB color off the screen may not work out

M  +1    -1    src/plugins/colorpicker/colorpicker.cpp

https://invent.kde.org/plasma/kwin/-/commit/b53c58b4e90e2bc4ed28a052bb772eceaf9e04f7
Comment 10 Zamundaaa 2025-05-22 13:29:40 UTC
Git commit f75fdc2a63497ce14fbc60a33175070d9e5bbb82 by Xaver Hugl.
Committed on 22/05/2025 at 12:29.
Pushed by zamundaaa into branch 'Plasma/6.4'.

plugins/colorpicker: round the result

Otherwise it gets clipped, which means the tiniest of rounding errors can
change the 8 bit result.

M  +1    -1    src/plugins/colorpicker/colorpicker.cpp

https://invent.kde.org/plasma/kwin/-/commit/f75fdc2a63497ce14fbc60a33175070d9e5bbb82
Comment 11 Nate Graham 2025-05-23 18:26:29 UTC
*** Bug 504606 has been marked as a duplicate of this bug. ***
Comment 12 Zamundaaa 2025-06-02 13:07:40 UTC
*** Bug 502645 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2025-06-16 22:17:21 UTC
*** Bug 505667 has been marked as a duplicate of this bug. ***