Change DocumentColorSpace to RGB via Javascript
Hi,
I have a Javascript Problem. I created a script that exports an vector icon in different formats, for print (eps and ai) and for web (png and svg). My Original DocumentColorSpace is CMYK.
When I export the web files the colors deviate from what I defined in the file, because the DocumentColorSpace is still CMYK and not RGB. I can only change it if I create a new document. Is there another way?
var grey = new RGBColor();
grey.red = 124;
grey.green = 131;
grey.blue = 132;
var param = bks.name.split('.');
realDocName = param[0];
file = preffix+filepreffix+realDocName+'_grau'+suffix;
folder = preffix+foldername;
var f = new Folder(bks.path + "/" + folder);
if (!f.exists)
f.create();
var saveName = new File ( f + "/" + file );
bks.exportFile(saveName, type, optionsSVG);
bks.close(SaveOptions.DONOTSAVECHANGES);
bks = null;
app.open (fullDocName);
bks = app.activeDocument;