Copy link to clipboard
Copied
I need to set registration color to selection and the following doesn't work
var colour = app.activeDocument.swatches['[registration]'].color;
selection[0].contents.fillColor = colour;
using `selection[0].fillColor` doesn't work also
Copy link to clipboard
Copied
Is the selection a text frame?
Copy link to clipboard
Copied
yes, it's a text frame
Copy link to clipboard
Copied
Try
selection[0].textRange.fillColor = color;
Copy link to clipboard
Copied
i used `textRange.characterAttributes.fillColor` based on your other answer and it works