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

adjust script to create processs and RGB swatches

Explorer ,
Jun 27, 2023 Jun 27, 2023

i need to two seperate scripts...
1 that will make a process color swatch
and a second that will create a RGB swatch


i have been using this to create my spot color swatch but i do not know what needs to be revised to make the two additional versions that i need

try { var newSpot = app.activeDocument.swatches.getByName("SPOT 262"); alert("spot 262 already exists")}
catch (e) {
var newSpot = app.activeDocument.spots.add();
var newColor = new CMYKColor();
newColor.cyan = 52;
newColor.magenta = 92;
newColor.yellow = 12;
newColor.black = 50;
newSpot.name = "SPOT 262";
newSpot.colorType = ColorModel.SPOT;
newSpot.color = newColor;
var newSpotColor = new SpotColor();
newSpotColor = newSpot;
newSpotColor.tint = 100;
}
//alert("done"); }
 
as always, any help is appreciated

scott
TOPICS
How-to , Scripting
412
Translate
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 2 Correct answers

Guide , Jun 27, 2023 Jun 27, 2023
var colour1 = new RGBColor();
colour1.red = 250;
colour1.green = 0;
colour1.blue = 0;

swatch1 = app.activeDocument.swatches.add();
swatch1.color = colour1;
swatch1.name = "Red 1"
Translate
Guide , Jun 27, 2023 Jun 27, 2023
var colour2 = new CMYKColor();
colour2.cyan = 0;
colour2.magenta = 100;
colour2.yellow = 100;
colour2.black = 0;

swatch2 = app.activeDocument.swatches.add();
swatch2.color = colour2;
swatch2.name = "Red 2"
Translate
Adobe
Guide ,
Jun 27, 2023 Jun 27, 2023
var colour1 = new RGBColor();
colour1.red = 250;
colour1.green = 0;
colour1.blue = 0;

swatch1 = app.activeDocument.swatches.add();
swatch1.color = colour1;
swatch1.name = "Red 1"
Translate
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 27, 2023 Jun 27, 2023

thank you...and how to make the CMYK version?

 

 

Translate
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
Guide ,
Jun 27, 2023 Jun 27, 2023
var colour2 = new CMYKColor();
colour2.cyan = 0;
colour2.magenta = 100;
colour2.yellow = 100;
colour2.black = 0;

swatch2 = app.activeDocument.swatches.add();
swatch2.color = colour2;
swatch2.name = "Red 2"
Translate
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 27, 2023 Jun 27, 2023
LATEST

THANK YOU!!!!!

 

scott

Translate
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