Question
Grayscale Color conver to CMYK Color
It has a problem converting Grayscale color to CMYK.
There is no problem in the codes I wrote until
I select the objects. But I couldn't convert the
selected color to CMYK color.
Where am I wrong?
var refDoc = app.activeDocument;
function myCmykColor(c, m, y, k) {
var ink = new CMYKColor();
ink.cyan = c;
ink.magenta = m;
ink.yellow = y;
ink.black = k;
return ink;
}
var textColor = new GrayColor();
textColor.gray = 3;
refDoc.defaultFillColor = textColor;
/// So far there are no problems. He makes the choice.
app.executeMenuCommand("Find Fill Color menu item");
/// But here the Grayscale can not convert to CMYK ??
refDoc.selection.fillColor = myCmykColor(0, 0, 0, 3);
