I am working to build a color swatch book. I am starting with just CMYK first and will move into other areas with this format once I get this established first. I have been able to develop all the containers needed, but I am unable to add a fillColor to these boxes. I feel that I do not know how to do this. Can someone please give me some help? Below is my script. Please keep in mind that my CMYK values must be able to be input as variable ex.
Var c = 0
Var m = 0
Var y = 0
Var k = 0
when I run this through a loop I will increase it by 5% so, it would be c=c+5 and then it will iterate through my loop.
myDocument = app.activeDocument;
{//Create a layer to hold the printers marks (if it does not already exist).
var myLayer = myDocument.layers.item("ColorSwatches");
try{
myLayerName = myLayer.name;
}
catch (myError){
var myLayer = myDocument.layers.add({name:"ColorSwatches"});
}
}
//Create Rectangle
//Set the bounds of the rectangle [x1, y1, x2, y2]
//The x1, y1 refers to the upper left coordinate position; the x2, y2 refers to the lower right coordinate
//x2 = Height and y2 = Width
var myPage = myDocument.pages.item(0);
var y1=1.76
var y2=2.21
var x1=1.05
var x2=1.5
for (i = 0; i<105; i=i+5) {
for (m=0;m<105;m=m+5){
var myRectangle = myPage.rectangles.add({geometricBounds:[x1, y1, x2, y2]});
y1=y1+.50
y2=y2+.50
}
y1=1.76
y2=2.21
x1=x1+.50
x2=x2+.50
}