Aloof Posted April 14, 2019 Share Posted April 14, 2019 Hi, After 3 hours of debugging I want to share my learnings with the development team of Affinity. 1. I created a global palette in Affinity. 2. I exported this palette as a. CLR file 3. I wanted to use these brand colors in Apple Pages and Keynote so I opened this CLR file in the Mac Color Picker there. 4. I noticed that all colors have been changed and shifted. They are no longer the same colors and they no longer have the same color values. That is right. The color values in RGB have been shifted. These are not the defined colors in Affinity. 5. Typing in the values that Affinity shows manually results in the same color. 6. Exporting the colors as CLR from Sketch and Zeplin results in correct colors. It's only from Affinity Designer that colors are shifted. This must be some kind of color management issue from Affinity Designer. I have the file set to standard SRGB. How can I export the palette for global use across MacOS without color shifting? Quote Link to comment Share on other sites More sharing options...
v_kyr Posted April 14, 2019 Share Posted April 14, 2019 Well I can't tell you how Affinity internally handles or writes out the color values for CLR files here, but usually a MacOS CLR file is just a serialized NSColorList object (see also the AppKit NSColorList class). So this means in more detail that single colors are defined in an OSX related NSColor object, which in turn is then added to a NSColorList object, the later as it's name implies is a container for holding colors objects and a CLR file is a serialized representation of that NSColorList object contents. - There are a bunch of tools which can read/inspect/convert etc. CLR files, it's pretty easy to handle those in/from ObjC/Swift code. Some references: ColorTools (a Github project with some tools and converters) The Macintosh OSX Color Picker (click on blue rect line topics to expand those) Apple NSColorList doc ... and so on ... So if colors are shifted when saved out from Affinity (I didn't tested), they might have been defined or written from another used color space (thus possibly different color values can occur), or colors values are internally then wrong converted or represented/hold in NSColorList objects. Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
v_kyr Posted April 14, 2019 Share Posted April 14, 2019 Here's a quick proof of the above said, namely that the contents of a CLR file is just a serialized AppKit NSColorList object. - I accessed an example CLR file in a Swift playground and iterated over the colors in the NSColorList, so to say inspecting and printing out it's color contents. namethatcolor.clr nscolorlist_output.txt Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
R C-R Posted April 14, 2019 Share Posted April 14, 2019 7 hours ago, Aloof said: I noticed that all colors have been changed and shifted. They are no longer the same colors and they no longer have the same color values. That is right. The color values in RGB have been shifted. The color values will shift depending on the color space set in the Apple Color Picker (ACP for short) in the Sliders pane. This is true no matter what app generated the .clr file. This is explained in the The Macintosh OS X Color Picker article @v_kyr mentioned. The appearance of the ACP has changed since that article was written, but otherwise the info in the "To Set the Color Space for a Swatch" topic contains the relevant info. Quote All 3 1.10.8, & all 3 V2.5.6 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7 Link to comment Share on other sites More sharing options...
Aloof Posted May 8, 2019 Author Share Posted May 8, 2019 If this was the case, how would it be possible that importing colors through Sketch and Zeplin results in correct colors? Sorry, I am not a developer so I don't really understand your code or the rather technical explanation. All I see is that I have an SRGB file and colors get shifted in Keynote even when I select the exact same color profile. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.