Copy link to clipboard
Copied
I'm wondering if this is an issue with Indesign in general or just a issue for me..
If i have a rectangle with no fill and a black stroke (stroke at the front) and i select the eyedropper tool and while holding shift, click on another rectangle with a pink fill and no stroke, isn't that supposed to change the stroke colour of my original object to pink? It works this way in Illustrator, but when i do it in indesign it just completely gets rid of the stroke weight setting it to zero, and has the stroke colour as none.
Copy link to clipboard
Copied
Sample the piece with while holding down the Alt/Option key
Then click on the piece you want to apply to.
And yes, I believe the behaviour is different to Illustator.
Copy link to clipboard
Copied
That didnt work. It removed the stroke and applied a fill.
Copy link to clipboard
Copied
Double Click the eyedropper tool and select the features you want to eyedrop.
Then only those features transfer.
You need to sample what you want to copy
Then apply it.
Maybe it's select the object first - then alt click on the item you want to copy from.
I can't remember off the top of my head.
You certainly shouldn't need a script for it. But maybe I'm misunderstanding your needs, without visuals it's to know what's going wrong.
Copy link to clipboard
Copied
Yes based on your answer I dont think you understood what i was trying to explain. Videos below should convey it better. What I'm trying to do you can do easily in Illustrator. It should work in Indesign also but is not.
Illustrator: https://youtu.be/MUJzhr9poyo
Indesign: https://youtu.be/BfCoWgeq4F4
Copy link to clipboard
Copied
No idea what you're trying to achieve.
I use the eyedropper tool in indesign everyday.
It works different to illustrator.
I'll have a look again and see what step I'm missing
I guess it's my misunderstanding.
Copy link to clipboard
Copied
What Im trying to achieve is what is shown in the illustrator video i posted ie changing the stroke colour of an object to the same fill colour from another object. Just like in the Illustrator video.. I was sure indesign could do this. You can see you get a different crosshair when holding shift with the eyedropper in Indesign which would indicate to me it's trying to do that specific task.
Copy link to clipboard
Copied
What’s happening here actually makes sense once you know how the Eyedropper tool behaves in InDesign.
It can copy fill and stroke attributes, but only if the source object actually has those attributes. In your example, you’re sampling a pink fill from an object that has no stroke, so InDesign reads that as “stroke = none” and applies that to your target, effectively removing its stroke.
You can’t directly take a fill colour from one object and have it automatically apply to the stroke of another that kind of stroke-to-fill swapping only looks possible in Illustrator because of how it handles appearance attributes, but it’s not truly converting one to the other there either.
Here's a basic examaple
Illustrator Stroke
This is how the stroke is applied in Illustrator.
I can't find a way to fill an object with the stroke colour using the eyedropper tool.
But it might only look like a stroked object as a hollowed out rectangle like below.
This would make the fill pink but looks like a stroke.
And when you sample this and apply it in Illustrator sure it fills with the colour as it's filled in illustrator.
It actually has no stroke, you can can see that in the screen shot, the stroke is null with a red stripe in the bottom left.
If you double click the eyedropper tool in Illustrator you get all sorts of functions, maybe a combination of this works for you I haven't tried, but you can see Illustrator has extra things it can pick up and apply - but I haven't played with it - but I can't imagine it would be pick up a stroke and use it as a fill.
The Eyedropper in InDesign options are limited compared to Illustrators
To achieve what you want in InDesign
Sample the stroke
And then use Shift X to swap the stroke with the fill
But I just can't find a way to get Illustrator to behave as you described it, and definitely not InDesign.
Eyedropper tool: can only copy matching attributes (fill to fill, stroke to stroke).
Your Script: forces fill to swap stroke swapping between objects.
InDesign limitation: no native command or option to interchange fill and stroke between different objects.
The script doesn't “fix” a bug, it's just coded around a limitation.
Copy link to clipboard
Copied
"But I just can't find a way to get Illustrator to behave as you described it"
Again, watch this: https://youtu.be/ZsTcftGtwt4
Did it blow your mind?
"Your Script: forces fill to swap stroke swapping between objects."
Correct and the other way around as well. Thus Achieving the very thing I set out to do. You said I shouldn't need to use a script to do it.
Copy link to clipboard
Copied
Yeh it does blow my mind.
I've tried several Illustrator settings and several key combinations following your video, and it doesn't work for me.
Can you give me a step by step (not video) in Illustrator to recreate? Can you share a file so I'm working exactly with what you have.
This is interesting for me, I've never seen it, behave like this.
You have marked one as a stroke and clearly a stroke - but the other is marked as a fill, but I don't see the actual fill settings, as it's not clicked on so it's not clear.
I just want to make sure I can recreate the scenario - a sample file would help tonnes.
Any scenario that looks like it did is either:
The object was already filled and just looked like a stroke.
Some visual trick (hollow rectangle, appearance stack) makes it look like a stroke has been filled.
Or your eyedropper in illustrator is set to pick up the stroke - and the filled object has a stroke.
I've never seen an eyedropper tool apply a fill to a stroke. And can't replicate the behaviour.
This has piqued my curiosity.
Copy link to clipboard
Copied
It's not a trick. They are 2 simple shapes, one is a stroke and one is a fill.
Here is another video to prove it: https://youtu.be/v66oopQhix8
The document isn't set up a certain way, start a fresh document and it will work.
This is a very basic function, you dont need to double click into the tool and check/uncheck certain things. All you have to do is hold shift (mentioned in my original post) just before you click on the second reference object.
I swear indesign used to be the same way and you can tell something changes about the eyedropper tool once you hold shift as a crosshair icon appears.
Anyway it simply doesnt work anymore so will continue to use my script to achieve the same thing.
Copy link to clipboard
Copied
Yeh it doesn't work for me.
Can you share your document?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Yeh I can't replicate it, no idea why your file shown in the video is pink and the file I asked for and you supplied is yellow? Why is that?
This is how it looks when I open it
So I have to change the Fill to something else - not a problem
Now I have a filled Pink square
Now I select the yellow stroke
The use the eyedropper and shift click the pink rectangle
It applies the fill and not the stroke as the sample doesn't have a stroke, how can it sample it or apply it?
I cannot find a key combo that applies the fill colour to the stroke.
I've toyed around in the options for the eyedropper and no combo in their does what you're showing.
Holding down Alt with eyedropper applies the stroke to the other object
Change the setting get slightly different behaviour
This is using Alt click with eye dropper after changing the settings
Anything I do in Illustrator does not change the stroke colour to the fill colour.
Copy link to clipboard
Copied
I just got chatgpt to write a script to do it. If anyone comes across it in the future and is interested, code is below. Select the object you want to change first, then shift select the second object for the reference you want the colour from. Then run the script.
// ApplyColorAutoReversed.jsx
// Automatically apply fill or stroke from the last selected object to all other selected objects
if (app.documents.length > 0) {
var sel = app.selection;
if (sel.length >= 2) {
var source = sel[sel.length - 1]; // last selected object = source
var targets = [];
// All other selected objects = targets
for (var i = 0; i < sel.length - 1; i++) {
targets.push(sel[i]);
}
for (var j = 0; j < targets.length; j++) {
var target = targets[j];
// Apply Fill → Stroke if possible
if (source.hasOwnProperty("fillColor") && target.hasOwnProperty("strokeColor")) {
if (target.strokeWeight === 0) target.strokeWeight = 1;
target.strokeColor = source.fillColor;
}
// Apply Stroke → Fill if possible
if (source.hasOwnProperty("strokeColor") && target.hasOwnProperty("fillColor")) {
target.fillColor = source.strokeColor;
}
}
}
}
Copy link to clipboard
Copied
My two cents: many features are included in both Illustrator and InDesign, but work differently.
You may find drag and drop colors useful to get where you want to go. You can drag saved swatches, but also just color that appears at the top of the Swatches panel (stroke or fill). Keep a close eye on the cursors: the \ under the arrow indicates you will change the stroke, the solid square indicates you will change the fill.
~Barb
Find more inspiration, events, and resources on the new Adobe Community
Explore Now