-
Notifications
You must be signed in to change notification settings - Fork 29
CLR and Sketchpalette inconsistencies #29
Comments
Looks like CLR is the incorrect one! I will see if there is a more reliable tool for the automated process. |
thanks @seejamescode ! if there's any testing I can do to help gimme a shout 👍 |
I have tried three different shell script and Keynote is still showing the same, wrong hex. Do you notice a pattern in how they are incorrect? |
hmm thats not cool :/ the only trend I can pick out is that they are all slightly darker than their correct counterpart. I know that we have had these problems in the past and we had to change the CLR for the same reasons, it might be worth trying to track down who converted that ASE in the past, @hchughes do you know who modified the last CLR to get it correct? |
Could this be something to do with CLR interpreting it according to the Apple gamut which is different to the PC gamut? And yes, I'm now throwing out random suggestions. |
I think what I really meant was that they may be being created in different colour spaces, i.e. sRGB versus AdobeRGB. |
I wonder if we could go from the raw hex values to a CLR rather than through the ASE medium? Eg take the SCSS and put that into a CLR converter? Im not sure what extra code is dropped in with an ASE to make it Adobe friendly... |
I have tried the json2clr and html2clr scripts also and got the exact same result 🙁 |
It makes me wonder if it is Keynote's interpretation of CLR files. Is there another program you can test with that uses CLR? |
So those above screengrabs came straight from Sketch - as the CLR comes in from the core apple colour picker I fear we will have those problems across the board. |
if we're feeling ambitious - this is the apple docs for the file format: https://developer.apple.com/reference/appkit/nscolorlist |
@winslet and I have been doing a bit of investigation... If you open the colour palette in Keynote (or elsewhere), choose Aqua 10, then go to the sliders tab you'll see the (incorrect) #5DE8F1. However, if you then use the cog on the sliders tab to change the colour profile from generic RGB to sRGB, it's really really close - just 1 bit out in the red, probably caused by rounding - #6BEBF4. It seems like the CLR is defaulting to generic RGB rather than being sRGB. It looks like it's possible to assert that an NSColor is sRGB as you create it: https://developer.apple.com/reference/appkit/nscolor#1891878. But this is all getting rather involved. |
Without wanting to post too many links that I have limited technical knowledge about, this chap has done exactly what we wanted to do but for Pantone Swatches, he even includes the obj-C code at the bottom we could edit: https://www.midwinter-dg.com/permalink-how-I-created-a-set-of-pantone-swatches-for-the-mac-osx-color-picker_2014-08-09.html |
OK, those suspicions seems to be reasonably founded - the different libraries you've used, @seejamescode, all seem to use either device or literal colour space, rather than sRGB. I might try forking json2clr to use sRGB. |
Got it! I think we want to use the 'calibrated' color space, i.e. the one which produces a |
Again, I can make Aqua 10 be produced correctly using Ase2Clr by switching to the calibrated color space - try this: https://github.com/ind1go/ColorTools/tree/calibrated |
Nice Ben! Y'all are the real MVPs. @ind1go, can you make a PR with your shell script? |
I seem to be finding inconsistencies across the board in the hex codes across the CLR vs the Sketchpalette (have not tried the ASE) from the v2.0.
eg. Sketchpalette on left, CLR on right.
Aqua 10
Sketchpalette #6AEBF4
CLR #5DE8F1
Yellow Core/10
Sketchpalette #FED500
CLR #FDCE0A
Wondering if these came from the export process for the CLR?
The text was updated successfully, but these errors were encountered: