User to select fill layer colour
I currently have a fill layer function that creates a while layer.. simple
function createFill() {
var fillColor = new SolidColor();
fillColor.rgb.red = 255;
fillColor.rgb.green = 255;
fillColor.rgb.blue = 255;
var newLayer = doc.artLayers.add();
newLayer.name = "fill " + (i + 1);
doc.selection.fill(fillColor);
newLayer.move(newLayer, ElementPlacement.PLACEAFTER);
var fillLayer = doc.activeLayer;
fillLayer.move(doc.layers[doc.layers.length-1], ElementPlacement.PLACEAFTER);
}
Is there a way for the user to select a colour instead of hard coding it? Giving them the option of black or white?
For example if the user was to use a logo as below with a white background it would not look so good. So it would be good to give them the option of a different colour for these situations
