Bug 503394 - Colour scheme thumbnail shows entirely wrong colours when enabling "Tint all colours with accent colour"
Summary: Colour scheme thumbnail shows entirely wrong colours when enabling "Tint all ...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_colors (other bugs)
Version First Reported In: 6.3.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-26 15:03 UTC by cyangalaxy
Modified: 2025-05-07 13:14 UTC (History)
6 users (show)

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


Attachments
Screenshot showing the colour scheme thumbnails with funny looking colours (1.70 MB, image/png)
2025-04-26 15:03 UTC, cyangalaxy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cyangalaxy 2025-04-26 15:03:12 UTC
Created attachment 180685 [details]
Screenshot showing the colour scheme thumbnails with funny looking colours

SUMMARY
When editing a default colour scheme (Breeze Light or Classic) and toggling on "Tint all colours with accent colour", and saving as new color scheme to be able to use it, the colour scheme thumbnail, at least for Breeze Light & Classic, is messed up.

See attached screenshot.

STEPS TO REPRODUCE
1. Edit default colour scheme (Breeze Light or Classic) -> Enable "Tint all colours with accent colour" -> save as new color scheme.

OBSERVED RESULT
Colour scheme thumbnail shows entirely wrong colours

EXPECTED RESULT
Thumbnail looking normal

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora KDE
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13
Qt Version: 6.9

ADDITIONAL INFORMATION
-/-
Comment 1 John Kizer 2025-04-27 19:05:18 UTC
I can reproduce this on my Fedora KDE 42 device. Thanks!
Comment 2 Akseli Lahtinen 2025-04-28 13:29:51 UTC
This is super weird, since the kcm returns the tinted color correctly. It's only the rendering part where it acts oddly.
Comment 3 Bug Janitor Service 2025-05-05 12:30:29 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5442
Comment 4 Akseli Lahtinen 2025-05-05 18:13:59 UTC
Git commit 4329b16a96a47c310e2d2a5da6f7543f94b6d3ec by Akseli Lahtinen.
Committed on 05/05/2025 at 12:31.
Pushed by akselmo into branch 'master'.

colorsapplicator: Don't allow extended RGB from OKLabToLinearSRGB

When reading the rgb values in OKLabToLinearSRGB, there is a chance,
when colors are tinted, for QColor::fromRgbF to return Extended RGB
colors, which can invert.
Read more at
https://doc.qt.io/qt-6/qcolor.html#the-extended-rgb-color-model

Instead, just make sure we always return regular RGB values.
FIXED-IN: 6.3

M  +1    -1    kcms/colors/colorsapplicator.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/4329b16a96a47c310e2d2a5da6f7543f94b6d3ec
Comment 5 Akseli Lahtinen 2025-05-07 13:14:41 UTC
Git commit 32a7cf2a06e16d58cbb8c4a0ab08a0832fa377d4 by Akseli Lahtinen.
Committed on 07/05/2025 at 09:53.
Pushed by ngraham into branch 'Plasma/6.3'.

colorsapplicator: Don't allow extended RGB from OKLabToLinearSRGB

When reading the rgb values in OKLabToLinearSRGB, there is a chance,
when colors are tinted, for QColor::fromRgbF to return Extended RGB
colors, which can invert.
Read more at
https://doc.qt.io/qt-6/qcolor.html#the-extended-rgb-color-model

Instead, just make sure we always return regular RGB values.
FIXED-IN: 6.3


(cherry picked from commit 4329b16a96a47c310e2d2a5da6f7543f94b6d3ec)

Co-authored-by: Akseli Lahtinen <akselmo@akselmo.dev>

M  +1    -1    kcms/colors/colorsapplicator.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/32a7cf2a06e16d58cbb8c4a0ab08a0832fa377d4