论坛帮助 |
社区圈子 |
日历事件 |
2018-01-17, 10:18 | #1 | ||
|
|||
正式会员
等级: 五袋长老
|
// Define the new color value newRGBColor = new RGBColor(); newRGBColor.red = 255; newRGBColor.green = 0; newRGBColor.blue = 0; // Create the new spot var newSpot = app.activeDocument.spots.add(); // Define the new SpotColor as 80% of the RGB color newSpot.name = "Scripted Red spot"; newSpot.tint = 80; newSpot.color = newRGBColor; // Apply a 50% tint of the new spot color to the frontmost path item. // Create a spotcolor object, set the tint value, var newSpotColor = new SpotColor(); newSpotColor.spot = newSpot; newSpotColor.tint = 50; // Use the spot color to set the fill color var frontPath = app.activeDocument.pathItems[0]; frontPath.filled = true; frontPath.fillColor = newSpotColor; } |
||
2018-01-17, 10:51 | 只看该作者 #2 | ||
|
|||
正式会员
等级: 五袋长老
|
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; } |
||