1

Is it possible to select an object and capture any information requested with the info Panel ctrl+8 in Illustrator, and F8 in Photoshop. like the CMYK, RGB Values of the fill and outline colors?

To be copied into the clipboard so it will be easier to paste it back in any other software?

The reason that I have a bunch of colors in so many files I need to recheck and normalize it for the print shop.

Is there any native method or any external scripts that do so in photoshop and Illustrator?

Thanks

  • Photoshop: Do you need CMYK, RGB of the active color or something more complex? I'm confused by term "object" and Photoshop – Sergey Kritskiy Jan 25 at 16:08
  • @SergeyKritskiy ... when you selected any object you may click [F8] in Photoshop and you will get some information about the object dimension and location as well as RGB and CMYK of the selected object. how can a grab this information in my clipboard ? and of course the same question for Illustrator. – hsawires Jan 25 at 16:19
  • there's no such info in Photoshop in Info (F8) panel: take.ms/idnkK You can see sizes/coordinates in the panel if you use Free Transform, but there's no information about "object color". If you say what info exactly do you need from Photoshop, it's possible to make a script that'd copy it to clipboard, but at the moment it sounds too vague – Sergey Kritskiy Jan 26 at 9:52
1

Photoshop: This script will copy position, bounds, fill and stroke colors of selected Shape layers to clipboard — as I understand that's what you need.

var lyr = "";
var ref = new ActionReference();
ref.putProperty(stringIDToTypeID("property"), stringIDToTypeID("targetLayers"));
ref.putEnumerated(charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt'));
var targetLayers = executeActionGet(ref).getList(stringIDToTypeID("targetLayers"));
for (var i = 0; i < targetLayers.count; i++)
{
    var ref2 = new ActionReference();
    try
    {
        activeDocument.backgroundLayer;
        ref2.putIndex(charIDToTypeID('Lyr '), targetLayers.getReference(i).getIndex());
        var desc = executeActionGet(ref2);
    }
    catch (o)
    {
        ref2.putIndex(charIDToTypeID('Lyr '), targetLayers.getReference(i).getIndex() + 1);
        var desc = executeActionGet(ref2);
    }

    var bounds = desc.getObjectValue(stringIDToTypeID("bounds")),
        adjColor = desc.getList(stringIDToTypeID('adjustment')).getObjectValue(0).getObjectValue(stringIDToTypeID('color')),
        strokeColor = desc.getObjectValue(stringIDToTypeID('AGMStrokeStyleInfo')).getObjectValue(stringIDToTypeID('strokeStyleContent')).getObjectValue(stringIDToTypeID('color')),
        color = new SolidColor(),
        colorStroke = new SolidColor();

    color.rgb.red = adjColor.getDouble(charIDToTypeID("Rd  "))
    color.rgb.green = adjColor.getDouble(charIDToTypeID("Grn "))
    color.rgb.blue = adjColor.getDouble(charIDToTypeID("Bl  "))

    colorStroke.rgb.red = strokeColor.getDouble(charIDToTypeID("Rd  "))
    colorStroke.rgb.green = strokeColor.getDouble(charIDToTypeID("Grn "))
    colorStroke.rgb.blue = strokeColor.getDouble(charIDToTypeID("Bl  "))

    lyr += "\tName: " + desc.getString(charIDToTypeID("Nm  "));
    lyr += "\ntop: " + bounds.getDouble(stringIDToTypeID("top"));
    lyr += "\nright: " + bounds.getDouble(stringIDToTypeID("right"));
    lyr += "\nbottom: " + bounds.getDouble(stringIDToTypeID("bottom"));
    lyr += "\nleft: " + bounds.getDouble(stringIDToTypeID("left"));
    lyr += "\nheight: " + bounds.getDouble(stringIDToTypeID("height"));
    lyr += "\nwidth: " + bounds.getDouble(stringIDToTypeID("width"));
    lyr += "\nfill RGB: [" + parseInt(color.rgb.red) + ", " + parseInt(color.rgb.green) + ", " + parseInt(color.rgb.blue) + "]";
    lyr += "\nfill CMYK: [" + parseInt(color.cmyk.cyan) + ", " + parseInt(color.cmyk.magenta) + ", " + parseInt(color.cmyk.yellow) + ", " + parseInt(color.cmyk.black) + "]";
    lyr += "\nstroke RGB: [" + parseInt(colorStroke.rgb.red) + ", " + parseInt(colorStroke.rgb.green) + ", " + parseInt(colorStroke.rgb.blue) + "]";
    lyr += "\nstroke CMYK: [" + parseInt(colorStroke.cmyk.cyan) + ", " + parseInt(colorStroke.cmyk.magenta) + ", " + parseInt(colorStroke.cmyk.yellow) + ", " + parseInt(colorStroke.cmyk.black) + "]";
    lyr += "\n\n"
}

copyToClipboard(lyr)

function copyToClipboard(txt)
{
    var desc = new ActionDescriptor();
    desc.putString(charIDToTypeID('TxtD'), txt);
    executeAction(app.stringIDToTypeID("textToClipboard"), desc, DialogModes.NO);
};

Input:

enter image description here

Result:

enter image description here

0

I don't know about Photoshop.


For Illustrator...

Open the Document Info Panel and use it's fly out menu to save the info as a text file.

enter image description here

Note that even though the Panel only shows one area of information at a time, when you Save the info each area is saved.

Unfortunately, it's not going to provide things like color breakouts of each object (that could balloon a text file beyond belief). But I would imagine that could be scripted.

Sample output...

Document Info - Fri Jan 25 09:00:03 2019
-----------------------------------------------------------------------------

Document:
Name: Untitled-5
Color Mode: CMYK color
Color Profile: U.S. Web Coated (SWOP) v2
Ruler Units: points
Artboard Dimensions: 649 pt x 649 pt
Show Images in Outline Mode: OFF
Highlight Substituted Fonts: OFF
Highlight Substituted Glyphs: OFF
Preserve Text Editability
Simulate Colored Paper: OFF

-----------------------------------------------------------------------------

Objects:
Paths: 3 (0 open, 3 closed, 12 points, length = 432.654 pt)
Compound Paths: NONE
Gradient Meshes: NONE
Symbol Instances: NONE
All Type Objects: NONE
Point Type Objects: NONE
Area Type Objects: NONE
Type on Path Objects: NONE
Clipping Masks: NONE
Opacity Masks: NONE
Transparent Groups: NONE
Transparent Objects: NONE
RGB Objects: NONE
CMYK Objects: 3
Grayscale Objects: NONE
Spot Color Objects: NONE
Pattern Objects: NONE
Gradient Objects: NONE
Brushed Objects: NONE
Styled Objects: NONE
Fonts: NONE
Linked Images: NONE
Embedded Images: NONE
Non-Native Art Objects: NONE

-----------------------------------------------------------------------------

Graphic Styles:
NONE

-----------------------------------------------------------------------------

Brushes:
NONE

-----------------------------------------------------------------------------

Spot Color Objects:
NONE

-----------------------------------------------------------------------------

Pattern Objects:
NONE

-----------------------------------------------------------------------------

Gradient Objects:
NONE

-----------------------------------------------------------------------------

Fonts:
NONE

-----------------------------------------------------------------------------

Linked Images:
NONE

-----------------------------------------------------------------------------

Embedded Images:
NONE

-----------------------------------------------------------------------------

Font Details:
NONE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.