Bug 441139

Summary: KPL palettes with Lab swatches aren't loaded correctly
Product: [Applications] krita Reporter: Dustin Wilson <dustin>
Component: * UnknownAssignee: wolthera <griffinvalley>
Status: RESOLVED FIXED    
Severity: normal CC: griffinvalley
Priority: NOR Keywords: regression, release_blocker
Version: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: macOS (DMG)   
OS: macOS   
Latest Commit: Version Fixed In:
Attachments: KPL palette file with Lab swatches
Screenshot of the loaded palette

Description Dustin Wilson 2021-08-18 20:24:05 UTC
Created attachment 140821 [details]
KPL palette file with Lab swatches

SUMMARY
KPL palettes which contain swatches which use Lab values aren't loaded correctly in Krita 5 Beta 1.

STEPS TO REPRODUCE
1. Load attached KPL palette in Krita 5 Beta 1

OBSERVED RESULT
All colors loaded into Krita are black

EXPECTED RESULT
Should be the colors I specified in the KPL file

SOFTWARE/OS VERSIONS
macOS: 10.14.6

ADDITIONAL INFORMATION
Comment 1 Dustin Wilson 2021-08-18 20:25:37 UTC
Created attachment 140822 [details]
Screenshot of the loaded palette
Comment 2 wolthera 2021-08-18 20:34:42 UTC
I can reproduce, probably caused by my endless fudging of the KoColor xml definition back in march.
Comment 3 wolthera 2021-09-06 12:24:13 UTC
Git commit 0ea48ccc440a3b5386cf86cb55bb477abb0a5c5c by Wolthera van Hövell tot Westerflier.
Committed on 06/09/2021 at 12:24.
Pushed by woltherav into branch 'krita/5.0'.

Fix loading of LAB KPL swatches.

Not only was the wrong element being read, but also the formula was wrong.
I should create a unittest for this when I am going to refactor the palettes again.

M  +11   -9    libs/pigment/resources/KoColorSet.cpp

https://invent.kde.org/graphics/krita/commit/0ea48ccc440a3b5386cf86cb55bb477abb0a5c5c
Comment 4 wolthera 2021-09-06 12:25:44 UTC
Git commit 434b1d5aff5c3b6137b269db30d094456d2ac490 by Wolthera van Hövell, on behalf of Wolthera van Hövell tot Westerflier.
Committed on 06/09/2021 at 12:25.
Pushed by woltherav into branch 'master'.

Fix loading of LAB KPL swatches.

Not only was the wrong element being read, but also the formula was wrong.
I should create a unittest for this when I am going to refactor the palettes again.


(cherry picked from commit 0ea48ccc440a3b5386cf86cb55bb477abb0a5c5c)

M  +11   -9    libs/pigment/resources/KoColorSet.cpp

https://invent.kde.org/graphics/krita/commit/434b1d5aff5c3b6137b269db30d094456d2ac490