Bug 339345 - Palette Colors in Krita are not color managed
Summary: Palette Colors in Krita are not color managed
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Color models (show other bugs)
Version: 2.9 Beta
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL: http://lts.cr/sd/1Ma7
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-24 02:27 UTC by ernest.lee
Modified: 2017-11-27 10:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Copic_358_ColorChart (11.51 KB, application/octet-stream)
2014-09-24 02:44 UTC, ernest.lee
Details
Slightly different palettes (513.36 KB, image/png)
2014-09-24 02:48 UTC, ernest.lee
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernest.lee 2014-09-24 02:27:32 UTC
Palette aco has cmyk colors.

Suspected problem: Krita directly loads the cmyk values in the aco file into a cmyk color, but assumes it is srgb therefore it gives the incorrect color.

Test case A works correctly:

1. Create a cmyk document
2. Draw a color from aco palette http://lts.cr/sd/5SS4
3. Export the document to psd
4. Load document in photoshop
5. Draw a color from the aco palette
6. Compare with color in document
7. Color is the same

Note: I tried to export tiffs or pdfs and comparing, but the colors were incorrect. So I'm using photoshop...

Reproducible: Always

Steps to Reproduce:
1. Create a rgb document
2. Draw a color from aco palette http://lts.cr/sd/5SS4
3. Export the document to psd
4. Load document in photoshop
5. Draw using the palette in photoshop.
6. Compare with color in document

Actual Results:  
The two patches have different colours.

Expected Results:  
The two patches should have the same colour.

On Windows 8.1
Comment 1 ernest.lee 2014-09-24 02:44:32 UTC
Created attachment 88824 [details]
Copic_358_ColorChart
Comment 2 ernest.lee 2014-09-24 02:48:21 UTC
Created attachment 88825 [details]
Slightly different palettes
Comment 3 ernest.lee 2014-09-24 03:01:37 UTC
You expect the palette to give the exact color when you use it, but in another color space.

Note: this does not work when you convert color spaces for the entire document.
Comment 4 Halla Rempt 2014-11-05 12:12:57 UTC
Hm, we do load the cmyk aco palettes as cmyk colors in KoColorSet.cpp, 491-498:

 else if (colorSpace == 2) { // CMYK
            e.color = KoColor(KoColorSpaceRegistry::instance()->colorSpace(CMYKAColorModelID.id(), Integer16BitsColorDepthID.id(), ""));
            reinterpret_cast<quint16*>(e.color.data())[0] = quint16_MAX - ch1;
            reinterpret_cast<quint16*>(e.color.data())[1] = quint16_MAX - ch2;
            reinterpret_cast<quint16*>(e.color.data())[2] = quint16_MAX - ch3;
            reinterpret_cast<quint16*>(e.color.data())[3] = quint16_MAX - ch4;
            e.color.setOpacity(OPACITY_OPAQUE_U8);
        }

 What can happen, I guess, is that Photoshop uses a different way to convert the cmyk color to rgb. I'm not yet sure what I can do here.
Comment 5 Halla Rempt 2015-06-26 11:56:16 UTC
I'm guessing, but it's undocumented, that photoshop doesn't color manage the colors in its palettes.
Comment 6 Halla Rempt 2017-11-27 10:28:46 UTC
Palette files are now color managed, but ACO files aren't. So, without knowing what CMYK profile was intended for an ACO file, there will still be issues with color reproduction.