Skip to main content
danielw42205661
Known Participant
October 24, 2025
Question

Indesign eyedropper tool

  • October 24, 2025
  • 3 replies
  • 390 views

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. 

3 replies

Barb Binder
Community Expert
October 26, 2025

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

 

~Barb at Rocky Mountain Training
danielw42205661
Known Participant
October 24, 2025

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;

            }

        }

    }

}

Community Expert
October 24, 2025

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. 

danielw42205661
Known Participant
October 24, 2025

That didnt work. It removed the stroke and applied a fill. 

Community Expert
October 24, 2025

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.