Giter VIP home page Giter VIP logo

Comments (19)

seejamescode avatar seejamescode commented on September 28, 2024 1

I have tried the json2clr and html2clr scripts also and got the exact same result 🙁

from colors.

winslet avatar winslet commented on September 28, 2024 1

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.

from colors.

seejamescode avatar seejamescode commented on September 28, 2024

Looks like CLR is the incorrect one! I will see if there is a more reliable tool for the automated process.

from colors.

winslet avatar winslet commented on September 28, 2024

thanks @seejamescode ! if there's any testing I can do to help gimme a shout 👍

from colors.

seejamescode avatar seejamescode commented on September 28, 2024

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?

from colors.

winslet avatar winslet commented on September 28, 2024

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?

from colors.

ind1go avatar ind1go commented on September 28, 2024

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.

from colors.

ind1go avatar ind1go commented on September 28, 2024

I think what I really meant was that they may be being created in different colour spaces, i.e. sRGB versus AdobeRGB.

from colors.

winslet avatar winslet commented on September 28, 2024

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...

from colors.

seejamescode avatar seejamescode commented on September 28, 2024

It makes me wonder if it is Keynote's interpretation of CLR files. Is there another program you can test with that uses CLR?

from colors.

winslet avatar winslet commented on September 28, 2024

if we're feeling ambitious - this is the apple docs for the file format: https://developer.apple.com/reference/appkit/nscolorlist

from colors.

ind1go avatar ind1go commented on September 28, 2024

@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.

2016-11-18 16_51_52

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.

from colors.

winslet avatar winslet commented on September 28, 2024

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

from colors.

ind1go avatar ind1go commented on September 28, 2024

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.

from colors.

ind1go avatar ind1go commented on September 28, 2024

Got it! I think we want to use the 'calibrated' color space, i.e. the one which produces a NSCalibratedRGBColorSpace. I've managed to get a CLR out with the right hex codes... or at least, for Aqua 10, which is better than before! @seejamescode Do you want to try this out and see if you get the right results? https://github.com/ind1go/json2clr/tree/calibrated

from colors.

ind1go avatar ind1go commented on September 28, 2024

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

from colors.

seejamescode avatar seejamescode commented on September 28, 2024

Nice Ben! Y'all are the real MVPs. @ind1go, can you make a PR with your shell script?

from colors.

seejamescode avatar seejamescode commented on September 28, 2024

🎉 Thanks @ind1go and @winslet!

from colors.

shagadorn avatar shagadorn commented on September 28, 2024

@ind1go and @winslet has the clr been updated to reflect the new color space? Still getting problems in keynote with the generic rgb color space.

from colors.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.