Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi Julien,
Can you give me some Idea about creating the color books from scratch.
Copy link to clipboard
Copied
I have this code that reads Color Book files:
http://ps-scripts.cvs.sourceforge.net/viewvc/ps-scripts/xtools/xlib/ColorBook.js
You will also need this file to do the binary I/O.
http://ps-scripts.cvs.sourceforge.net/viewvc/ps-scripts/xtools/xlib/Stream.js
There are several 'magic' fields in ColorBook (like Vendor ID and Vendor Name) that
you will have to figure out how to create new values that PS likes. Using
swatch files is much easier and code is on the sourceforge site for reading
and writing those.
Copy link to clipboard
Copied
For the most part, you should not be creating color book files. Those are for folks like Pantone, Toyo, DIC, etc. who publish real swatch books.
Most users should only be creating .ACO or .ASE files for their color swatches.
Copy link to clipboard
Copied
And creating ASE files/books is very easy too… if you have/script ID… just add colors to a temp doc swatches and app save swatches…
Copy link to clipboard
Copied
You mean the question the original poster had found the answer to himself in 2008?
Have you noticed that the conversation had shifted somewhat since then?
Copy link to clipboard
Copied
Just in case someone still needs to create custom color books from scratch, I wrote two scripts which might be useful, for Photoshop CS3 or later:
Two generated custom color books, based on the W3C and X11 sets of color names, are also available from the new Goodies section of my site.
Copy link to clipboard
Copied
I tried to generate the acb file, but still ran into a problem. The RIP software does not recognize the color as a custom spot color. Isn't there any software that can take care of generating an acb file with some options?
Copy link to clipboard
Copied
What are you talking about specifically?
Have you created a Spot Channel in the image/s?
Copy link to clipboard
Copied
Did not work for CC, any updates for the script in the near future? Thanks for putting together
Copy link to clipboard
Copied
Hopefully, I'll be able to provide some adequate answer after getting more information:
ASK- Forum Success Guide: Efficiently using the forums
Ask: Include relevant information
Make sure that you include enough information about your issue so that folks can provide the answer you need. See below for tips that can help you get a useful response.
Tips for effective posting
Include details, such as:
--Mikaeru
Copy link to clipboard
Copied
Thanks, Mikaeru, for keeping up the good fight that I could no longer wage.
Copy link to clipboard
Copied
Many thanks!!!
Just tried and made some CMYK colors, created a book and works flawlessly!
Many thanks for all the work creating the scripts and doing all research.
I used a simple code editor for adjusting the JSON. Then used Photoshop CC 2018, I cant upgrade due to old system
Copy link to clipboard
Copied
i was able to do this for >3000 colors relatively easily. you can source the color book info from many places. if you were doing pantone or something like that you could query all potential combinations of this URL https://www.pantone.com/media/wysiwyg/color-finder/img/pantone-color-chip-101-c.webp and filter responses to only show images that respond with X-Cache: HIT, HIT (not X-Cache: MISS, MISS), writing the successful links to a .csv file, wget the image links in csv to a directory, then run imagemagick against that directory to create a 3-5 depth histogram of the webp images, sort histogram by most occuring and use regex to get the individual RGB values for the most occuring color which you could then use to build your own color book later on, or just store the hex value, or whatever value you want. example of unfiltered imagemagick histogram response:
6442: (25,25,25) #191919 srgb(25,25,25)
1832: (184,183,164) #B8B7A4 srgb(184,183,164)
88526: (254,254,254) #FEFEFE srgb(254,254,254)
193600: (255,215,1) #FFD701 srgb(255,215,1)
Building a color book:
Download and unzip this.
https://github.com/atesgoral/acb
In the main directory, create a json file with your specs, save it as data.json with RGB, CMYK or Lab values as numbers (below example is in RGB so RGB values are used, separated by comma separated lines in the "components" section):
{
"id":3057,
"title":"TitleOfYourBook",
"colorNamePrefix":"",
"colorNamePostfix":"",
"description":"Description not visible or used anywhere practical",
"pageSize":7,
"pageKey":4,
"colorModel":"RGB",
"colors":[
{
"name":"Spot Color Name 1",
"code":"000001",
"spotProcessIdentifier":"spflspot",
"components":[
50,
46,
32
]
},
{
"name":"Spot Color Name 2",
"code":"000002",
"components":[
33,
39,
32
]
}
]
}
edit encode-acb.js to:
const fs = require('fs');
const { encodeAcb } = require('@atesgoral/acb');
// Specify the path to your JSON file containing the ACB data
const jsonFilePath = 'data.json'; // Update with your file path
// Read the JSON file
fs.readFile(jsonFilePath, 'utf8', (err, data) => {
if (err) {
console.error('Error reading JSON file:', err);
return;
}
try {
const acbData = JSON.parse(data);
// Encode ACB data
const acbBuffer = Buffer.concat([...encodeAcb(acbData)]);
// Write the ACB buffer to a file
fs.writeFileSync('TitleOfYourBook.acb', acbBuffer);
console.log('ACB file generated successfully: mybook.acb');
} catch (error) {
console.error('Error parsing JSON or encoding to ACB:', error);
}
});
make sure node.js is installed. start a powershell or command in that directory and type node encode-acb.js. your colorbook should now be in the directory.
To change all colors to spot colors, open your .acb file in a binary hex editor https://hexed.it/ and edit the last 8 bits (scroll all the way down and replace letters on right side) from spflproc to spflspot. you now have a spot color library.
EDIT: you have to use Lab colors from the gitgo to make an accurate spot color library. you cant just write spflspot at the end of the acb hex file.
Copy link to clipboard
Copied
I doubt your numbers for CMYK are as the official ones. The real CMYK values differ from a color chip and then simply made CMYK. Appreciatie the work though
Copy link to clipboard
Copied
(Edit 2 for readers: Lab colors are used in acb files as Lab is a good intermediary between RGB/CMYK. Starting with Lab is the safest option, the next safest option when converting RGB to CMYK or vice versa is first converting to Lab and then converting to the desired color. if converting to cielab via spreadsheet you would have about 25 columns: RGB, normalized RGB, green val, magenta val, blue val, yellow val, gamma corrected RGB, XYZ defined, normalized XYZ, trans XYZ, final result of Lab values)
Thanks for reading. Correct, the CMYK and RGB will slightly vary but will suffice for digital preview since RGB is being pulled. Official pantone acb files use Lab values and no other values are stored- RGB and CMYK is left up to your graphics program to interpret which 99.9% of the time has a doc color mode of RGB or CMYK, so the Lab values aren't even being utilized 99% of the time.
That being said, if printing with color conversion on a printer that already has the pantone library, the CMYK/RGB/Lab values are all trashed at time of printing and that printers' own color library management is used to define ink output based solely on the spot color ID, all other info is ignored. You could have a spot color like "PANTONE Yellow 021 C" physically colored CMYK 0 0 0 0 (white) in the document and if the printer uses color conversion it would set it's own CMYK output based on it's calibration like 0 1 98 1. Printing without color conversion leaves CMYK up to chance as CMYK 10 20 10 5 will look vastly different from printer to printer. Most printers nowadays also use RGB instead of CMYK, if color conversion is not set, as RGB has a wider spectrum of colors, that's why I chose to pull RGB. Also some printers run dual CMYK and some even run a lighter version like Cyan-lightcyan-magenta-lightmagenta-yellow-lightyellow.
To get accurate cmyk or Lab values, the most recent data is likely hosted on a 3rd party site and would require an additional step after code validation and before building the color book, like querying this URL https://icolorpalette.com/color/pantone-VALUE-c and scraping lab values from selector #content > div > div.col-sm-12.py-4.col-md-6 > div:nth-child(5), and route output to your CSV prior to creating the .json file from CSV. not sure if those values are accurate but that's how you'd do it.
EDIT: you have to use Lab colors from the gitgo to make an accurate spot color library. you cant just write spflspot at the end of the acb hex file.