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

Script or action to activate global in SwatchColor

Explorer ,
Oct 18, 2018 Oct 18, 2018

Copy link to clipboard

Copied

Hello,

I try to modify "global" property of a SwatchColor with script or action but nothing works.

Anyone have an idea ?

Thanks

TOPICS
Scripting

Views

576

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

Explorer , Oct 18, 2018 Oct 18, 2018

Sorry,

In fact I found the solution.

I need to create a SpotColor and define properties :

- 'colorType' on ColorModel.SPOT

- 'spotKind' on SpotColorKind.SPOTRGB

And that's work !!! Great !

Votes

Translate

Translate
Adobe
Explorer ,
Oct 18, 2018 Oct 18, 2018

Copy link to clipboard

Copied

Sorry,

In fact I found the solution.

I need to create a SpotColor and define properties :

- 'colorType' on ColorModel.SPOT

- 'spotKind' on SpotColorKind.SPOTRGB

And that's work !!! Great !

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
Explorer ,
Jun 21, 2020 Jun 21, 2020

Copy link to clipboard

Copied

Hello!

 

can you show us a more complete version of that solution?

 

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
Community Expert ,
Jun 21, 2020 Jun 21, 2020

Copy link to clipboard

Copied

the full sample is in the scripting reference

 

//Creating a new spot color
// Creates a new spot color in the current document, then applies an 80% tint to the
color
if ( app.documents.length > 0 ){
var doc = app.activeDocument;
// Create the new spot
var newSpot = doc.spots.add();
// Define the new color value
var newColor = new CMYKColor();
newColor.cyan = 35;
newColor.magenta = 0;
newColor.yellow = 50;
newColor.black = 0;
// Define a new SpotColor with an 80% tint
// of the new Spot's color. The spot color can then
// be applied to an art item like any other color.
newSpot.name = "Pea-Green";
newSpot.colorType = ColorModel.SPOT;
newSpot.color = newColor;
var newSpotColor = new SpotColor();
newSpotColor.spot = newSpot;
newSpotColor.tint = 80;
}

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
Explorer ,
Jun 22, 2020 Jun 22, 2020

Copy link to clipboard

Copied

LATEST

Hello, Carlos!

Thanks for your answer, but I really want a Script or action to activate Global  property of  every Swatch.

E73E70AD-300E-4FEB-ACCC-248F90194C5E.jpeg

 

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