Last active
October 6, 2016 01:41
-
-
Save milligramme/15b03a117275ea4fa554f3e09c0412a8 to your computer and use it in GitHub Desktop.
ColorGroupSwatch sample - InDesign CC 2014 or later
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@target "indesign-10" | |
var doc = app.documents.add(); | |
var color_group = doc.colorGroups.add({name:"CG"}); | |
var ref_swatch = doc.colors.add({ | |
model: ColorModel.PROCESS, | |
space: ColorSpace.CMYK, | |
colorValue: [100,50,0,0], | |
name: "ref_swatch"} | |
); | |
var color_group_swatch = color_group.colorGroupSwatches.add(ref_swatch); | |
$.writeln([ | |
color_group_swatch.swatchItemRef.colorValue, | |
color_group_swatch.swatchItemRef.name | |
]); | |
// => [[100,50,0,0],"ref_swatch"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment