indd Replace with Tint Swatch

Using InDesign CS, is there a way to change the fill color of a swatch if the intended fill color exists in the swatch palette as multiple tint swatches? For instance, the swatch palette has swatches: [Black] / [Black] 90% / [Black] 80% / [Black] 70% / [Black] 60% / [Black] 50%.

This script below will not work unless the originating swatch is one of the few tint swatches above. But if the selected object had a fill with a swatch called “Orange” the script will not work.


tell application "InDesign CS"
	set properties of selection to {fill color:swatch "Black" of document 1, fill tint:100}
end tell

Hi Jeff

Not sure if this is what you mean but here goes.
Created a tint swatch of black at 50%, created a rectangle and colored it up with a random swatch (this wasn’t a tint swatch just a normal swatch)
from the pallette (think it was yellow!) and run this

tell application "Adobe InDesign CS2"
	--get name of every swatch of document 1
	set properties of selection of document 1 to {fill color:swatch "[Black] 50%" of document 1}
end tell

which changed it to the tint swatch. “[Black] 50%”
is that the result you are after or am i way off…


You are not way off, you have actually solved my problem!

Oddly I was ready to send a long response explaining otherwise since I was testing in CS, in which this doesn’t work the same way.

But then I figured, what the heck, we are going to updating to CS2 relatively soon so I might as well try it there. Sure enough you remedy works like a charm.

Thank you very much!