• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How can I check the color profile for the current document?

New Here ,
Oct 16, 2012 Oct 16, 2012

Copy link to clipboard

Copied

I'd like to create a script that checks the current document's color profile and checks it against a string, for example "sRGB IEC61966-2.1". My studio has a script that performs various functions to make sure that all the layers are visible/unlocked, checks for stray points, etc., and we'd like to add a check to the color profile because we handle a large number of files and this setting is overlooked a lot.

It's alright if this value isn't writable through script (we can just pop up an alert letting the user know that they need to change it), but I can't find where to actually read this setting! We're currently working on Macs and with JavaScript, but any nudge in the right direction would be great.

Thanks!

TOPICS
Scripting

Views

4.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 16, 2012 Oct 16, 2012

It only appears in the PDF and AI save options and only as a boolean true or false. It doesn't appear to be accessable to scripting.

Votes

Translate

Translate
Adobe
Community Expert ,
Oct 16, 2012 Oct 16, 2012

Copy link to clipboard

Copied

It only appears in the PDF and AI save options and only as a boolean true or false. It doesn't appear to be accessable to scripting.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 16, 2012 Oct 16, 2012

Copy link to clipboard

Copied

Ah well. I pored through the JavaScript docs and came up with nothing but I wanted to ask here just to be sure. Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Oct 16, 2012 Oct 16, 2012

Copy link to clipboard

Copied

Not sure if you could maybe cobble something together using something in these? Maybe based on a defined list of whats what and what uses what?

http://forums.adobe.com/message/3886676

http://forums.adobe.com/thread/874476

Again would be cobbling and maybe not doable even so.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 16, 2012 Oct 16, 2012

Copy link to clipboard

Copied

I actually tried the code in the second link and it outputs somethink like "/Library/Application Support/Adobe/Color/Settings/Recommended/North America General Purpose.csf", which is the name of the actual color space file being used by the application. However, there's no way to extract additional information like actual color profile names. 😕

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 16, 2012 Oct 16, 2012

Copy link to clipboard

Copied

Photoshop can do it, I opened my illustrator file manually in PS and...

alert(app.activeDocument.colorProfileName);

gave me the answer...so there's an option.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 16, 2012 Oct 16, 2012

Copy link to clipboard

Copied

You're right, but trying to do the same thing in Illustrator gives you null. We can't add Photoshop to our work process just for this change...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 16, 2012 Oct 16, 2012

Copy link to clipboard

Copied

if you don't own PS yeah, that wouldn't be an option...but if you do, then why not?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 16, 2012 Oct 16, 2012

Copy link to clipboard

Copied

The Annoyance Factor. The idea was to add the color profile check once an illustrator is finished with a particular file as a kind of "clean up" before they save and move on to something else. My options as of right now are:

  • Create a script that saves the file in Illustrator and then closes the document, opens Photoshop if it wasn't open already (wait to load), opens the file in Photoshop (wait to load), change the color profile, and save (wait for the extra save).
  • Create a script that pops up an alert that says, "Check that your color profile is set to sRGB IEC61966-2.1". And the illustrator will check, save the file, and move on.

We have close to 30 people working on several files every day so wasting all that time waiting for files to load and save in a different application adds up in man-hours pretty quick. In this particular case, getting our people to do it is more efficient.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 16, 2012 Oct 16, 2012

Copy link to clipboard

Copied

unfortunately illustrator is very limited and there's not much we can do about it, I hear your pain...what I was saying is not to save the file in PS, just merely reporting the profile name, but yeah, there's no way around waiting for PS to load the Ai file, and PS at least once. This option could be incorporated into your regular script.

...in other news, I heard CS6 can run Menu Commands, I wonder how that could help in your request.

also, if you have considered running a separate script that says "check that your color profile....." then you might as well assign a shortcut key to the Menu->Edit->Assign Profile...and change it if you have to or Esc if ok.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 16, 2012 Oct 16, 2012

Copy link to clipboard

Copied

An expansion of scriptable items would be more helpful, but I'll take running Menu commands in a pinch

Assigning a shortcut is a good idea. We'll probably add that in addition to the "Check that..." popup.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Oct 17, 2012 Oct 17, 2012

Copy link to clipboard

Copied

Your Color Management in AI is done with the loaded settings file… Supply null and its OFF supply a settings file that warns on opening ( have user interaction on ) or one that converts without warning… You can change these with your script.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 07, 2022 Dec 07, 2022

Copy link to clipboard

Copied

LATEST

10 years later.... Run menu commands works now, but still we can not apply by script. Only thing i can do is check for a documentProfile, if it's not what i want the use app.menucommand("assignProfile") still needs user input. Wish we could script it. I could fiddle around if say calling Ng VBS works then. But it need a dynamic method.

 

I need to make a new document which uses the same profile as an already open one. But if the open one is not the same as the app color management settings, it, it wil can see an issue. Guess i can not go around this. I'll just have to add an if statement checking the name, the. Show the popuo

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines