Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMS #17

Open
dy opened this issue Jun 10, 2016 · 6 comments
Open

PMS #17

dy opened this issue Jun 10, 2016 · 6 comments

Comments

@dy
Copy link
Member

dy commented Jun 10, 2016

Pantone color system may have legal issues using it in open-source. Thought here it would require some neural network to calc the formula.

@olehmelnyk
Copy link
Member

Looks like PANTONE is not a color system but a handpicked color standardization, and I'm not sure if there's a system

We can search by hex here, at the official site https://store.pantone.com/eu/en/colorfinder/index/search/q/#ffffff where #ffffff is color hex
this search request returns up to 100 samples

I tried to fetch() pages but looks like they load search result async with delay and maybe do some checks to prevent crawling/parsing - or maybe I'm just doing something wrong

some PANTONE to RGB / CMYK / HEX tables can be found online but I'm not sure they are complete
For example:

@olehmelnyk
Copy link
Member

olehmelnyk commented Dec 30, 2017

All designer software installs with color libraries, right?

For example, Adobe store libraries in its own proprietary binary format - .acb (Adobe Color Book)
There are .acb libs for:

  • ANPA Color
  • DIC Color Guide
  • FOCOLTONE
  • HKS E Process
  • HKS E
  • HKS K Process
  • HKS K
  • HKS N Process
  • HKS N
  • HKS Z Process
  • HKS Z
  • PANTONE solid coated
  • PANTONE solid uncoated
  • PANTONE+ CMYK Coated
  • PANTONE+ CMYK Uncoated
  • PANTONE+ Color Bridge Coated
  • PANTONE+ Color Bridge Uncoated
  • PANTONE+ Metallic Coated
  • PANTONE+ Pastels & Neons Coated
  • PANTONE+ Pastels & Neons Uncoated
  • PANTONE+ Premium Metallics Coated
  • PANTONE+ Solid Coated
  • PANTONE+ Solid Uncoated
  • TOYO 94 COLOR FINDER
  • TOYO COLOR FINDER
  • TRUMATCH
  • System (Macintosh)
  • System (Windows)
  • Web

I have found acb2xml convertor (source code in C++ https://github.com/atesgoral/acb2xml and compiled .exe file https://magnetiq.ca/pages/freeware/#acb2xml for Windows console);

Also, I have found a topic at the Adobe forums (https://forums.adobe.com/thread/435262) where in one of the comments I have found a link to ExtendScript (Adobe version of JS v1.6 with custom DOM/BOM for Adobe software, that allows writing scripts/extensions for Adobe software) - this script runs directly from Photoshop/InDesign etc. and can convert Adobe's .acb file to .json format; - here's the link for that script - http://www.tonton-pixel.com/scripts/utility-scripts/parse-color-book-file/; The problem is that this script was written for Adobe CS3 and dosn't work in modern CC out of the box - there are errors... I commented lines that produce errors (LOL) and was able to get .json files from .acb but can't be sure if the file were converted properly since there were errors in the outdated code...

But maybe we don't need to do any conversions and can directly read .acb files as binary (I don't know how to work with binaries, especially in JS); The problem is that we might have problems because of publishing and distribute reverse-engineered Adobe files with 3rd party color pallets... So it might be better to create a website/web service with REST API that will store color libs info...


Affinity Designer from Serif (haven't checked Affinity Photo yet) installs with PANTONE libs as .csv files (Yay!!!) and also contains some Pantone libs that Adobe is missing, such as:

  • PANTONE GoeBridge Coated
  • PANTONE GoeGuide Coated
  • PANTONE GoeGuide Uncoated
  • PANTONE Plus Bridge Coated-V2
  • PANTONE Plus Bridge Uncoated-V2
    Having a quick look at this .csv files I have started to see the pattern:
  1. If color name ends with the C - this means Coated lib; U at the end means Uncoated;
    PANTONE P 1-1 C means its a "Pantone Plus" library; Pantone 871-877 and 8xxx - metallics lib; 9xxx and 8xx-950 Pastels and Neons... and so on...
  2. Colors that have color name follow the pattern:
    PANTONE <color-name> <3 or 4 number> <C or U> - all numbers starts with the 0 and if there's 4th digit it always equals 1; 2 & 3 digits represents color itself, for example:
  • PANTONE Yellow 0131 C - so yellow is always 13
  • PANTONE Orange 0211 C - orange is 21
  • PANTONE Red 0331 C - red is 33...
  • PANTONE Magenta 0521 C
  • PANTONE Violet 0631 C
  • PANTONE Blue 0821 C
  • PANTONE Green 0921 C
  • PANTONE Black 0961 C

UPD: 3) There are a lot of color variations like:
148 and 1485
149 and 1495
150 and 1505
where 5 at the end represents a darker version of the same shade/hue
also, there are colors like:
185 and 185 2X
1788 and 1788 2X where 2x also represents a darker version

UPD: 4) Pantone Numbering Explained https://www.pantone.com/pantone-numbering-explained


Need to check if other software (Corel, Autodesk, Sketch, etc.) has color libs that can be examined
UPD: Software Licensees https://www.pantone.com/software-licensees


UPD: .csv format is probably the best text format for storing color libs as we can read file line-by-line while searching for value or do a RegExp for entire file

@olehmelnyk
Copy link
Member

olehmelnyk commented Dec 30, 2017

OK, I'm probably doing it all wrong, but it works, somehow (at least for now, lol)

You need to have CORS enabled in your [Chrome] browser (with a plugin or with a flag --disable-web-security or something like that)

get HEX/RGB/CMYK by Pantone code (parse official Pantone website search result) - https://gist.github.com/olehmelnyk/40f46c7f05bf2fdd6d897338a48755c6

Parsing 3rd party website for RGB to Pantone https://gist.github.com/olehmelnyk/0aff52f300ef6f778b3a9ab03b5f7bfd

Parse from search result, manually, browser-only
https://gist.github.com/olehmelnyk/1c3dd06a57dab0cc721a41bcbe06de26

@dy
Copy link
Member Author

dy commented Dec 31, 2017

@olehmelnyk https://en.wikipedia.org/wiki/Pantone#Intellectual_property — the problem is not technical, but legal, unfortunately. I wonder if we approximate pantone with some intellectual algo — would it be considered an intellectual infringement or not. We can reverse-engineer pantone and release it open-source, but that is a bit useless − not sure who may need hacked pantone system, that is just not serious, business-wise.

@olehmelnyk
Copy link
Member

Yeah, I think we should understand the difference between color mode that can be calculated and color pallet which might be just a set of handpicked values, names and be an intellectual property... So I suggest to split this library into two - one for color modes only and the other for color pallets.

@olehmelnyk
Copy link
Member

Looks like Pantone allows to share its libraries with a workgroup:
https://www.pantone.com/help/?t=Sharing-Libraries-from-PANTONE-Color-Manager-with-Workgroup

How can I share PANTONE Color Manager Libraries with Others?
While PANTONE Color Manager is single-user, the PANTONE libraries may be shared with other users without license restriction.
-- says in its official website

Now I got all the latest and greatest libraries/pallets/swatches from PANTONE Color Manager as .acb files - all with LAB color values as it has wider gamut compared to sRGB and CMYK

So, theoretically, we can share .acb files on the server, so our workgroup [all across the globe] can have access to them. Of course, we will disable indexing of this folder so nobody except our workgroup with direct links can find them... Then we can read those files as binaries - here's unofficial .acb specification https://magnetiq.ca/pages/acb-spec/
and here's acb2xml source code in C++ https://github.com/atesgoral/acb2xml from the same author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants