Script or action to activate global in SwatchColor

Explorer ,
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

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 !

TOPICS
Scripting

Views

338

Likes

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

Script or action to activate global in SwatchColor

Explorer ,
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

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 !

TOPICS
Scripting

Views

339

Likes

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
Oct 18, 2018 0
Explorer ,
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 !

Likes

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
Reply
Loading...
Oct 18, 2018 0
Community Beginner ,
Jun 21, 2020

Copy link to clipboard

Copied

Hello!

 

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

 

Thanks.

Likes

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
Reply
Loading...
Jun 21, 2020 0
Adobe Community Professional ,
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;
}

Likes

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
Reply
Loading...
Jun 21, 2020 0
Community Beginner ,
Jun 22, 2020

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Jun 22, 2020 0
Resources