This content has been marked as final.
Show 4 replies
-
1. Re: Select color in specific xy location of an image?
Noel Carboni Feb 16, 2011 2:52 PM (in response to carleq)There doesn't appear to be a direct way to do it with actions, because a Set Background Color (or Set Foreground Color) step in an action records the color, not the position.
I think you'll likely need to use a script for this, not an action. Unfortunately, I'm no script expert.
-Noel
-
2. Re: Select color in specific xy location of an image?
Paul Riggott Feb 16, 2011 3:06 PM (in response to carleq)You could use a script and call the script with your action.
#target Photoshop function main(){ if(!documents.length) return; app.activeDocument.colorSamplers.removeAll(); var X = activeDocument.width.as('px')/2; var sample = activeDocument.colorSamplers.add( [ new UnitValue( X, 'px' ), new UnitValue( 1, 'px' ) ] ); app.backgroundColor=sample.color; app.activeDocument.colorSamplers.removeAll(); } main(); -
3. Re: Select color in specific xy location of an image?
emil emil Feb 17, 2011 6:23 AM (in response to carleq)Never mind, misunderstood the question
-
4. Re: Select color in specific xy location of an image?
carleq Feb 17, 2011 5:22 AM (in response to Paul Riggott)Back again.
Thank you, Paul
The script you offered does the task I need to do.
Incentive to keep studying jsx.
Thanks again.


