Script To Find Color At Coordinates X,Y

L
Posted By
lurisia
May 8, 2006
Views
3584
Replies
11
Status
Closed
Right now, if I want to find the RGB value of a pixel at X,Y, I just use the magnifying tool and mouse over the pixel. But when I need a number of pixel values at different places on the image, this is time consuming.

Is there any way to write a script in which I could input a number of X,Y values, and the script would output the color at each location?

Thanks for any ideas,
cpp

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

LS
Larry Scripts
May 8, 2006
Here is a script that I wrote for a Biologist.

It allows you to save multiple sample points and then write those samples out to an Excel spreadsheet file.

http://home.comcast.net/~larryscripts/Photoshop_CS/SaveColor Data.ZIP

There is a README.pdf file inside the zip file that contains instructions for setting up and using these script.

It requires at least Photoshop CS.

Larry
L
lurisia
May 8, 2006
It requires at least Photoshop CS.

Larry,

I have PS 7. Is there any way to make it work with that?
MR
Mike Russell
May 8, 2006
"cppaddict" wrote in message
Right now, if I want to find the RGB value of a pixel at X,Y, I just use the magnifying tool and mouse over the pixel. But when I need a number of pixel values at different places on the image, this is time consuming.

Is there any way to write a script in which I could input a number of X,Y values, and the script would output the color at each location?

The Curvemeister demo will do this – you can save sample points in a file, load them, display the color values, and do a number of things with those values – delta E and std dev calculations for example.

Mike Russell
www.mike.russell-home.net
L
lurisia
May 8, 2006
The Curvemeister demo will do this – you can save sample points in a file, load them, display the color values, and do a number of things with those values – delta E and std dev calculations for example.

Mike,

How do you use CM to do this?

Thanks…
LS
Larry Scripts
May 8, 2006
I would have to rewrite it to work with Photoshop 7. I don’t know if I can do that. I’m working on a complex script at this time
and don’t have the time to rewrite.

It should work in CS2. CS2 is a good upgrade. Lots of great new stuff like smart objects. Time to upgrade!

I’m not writing any scripts for Photoshop 7. I’m concentrating on CS2.

Sorry.

Larry
MR
Mike Russell
May 9, 2006
"cppaddict" wrote in message
The Curvemeister demo will do this – you can save sample points in a file, load them, display the color values, and do a number of things with those values – delta E and std dev calculations for example.

Mike,
How do you use CM to do this?

First install the demo:
http://www.curvemeister.com/downloads/cmdemo/index.html

Start Curvemeister using the Filters menu. Then Alt click on the points you want to measure, and right click on the image and save the sample points in a file.

Later you can load the sample file, and the sample points will reappear in their original locations. That will do the trick if all you want are individual color values. There are additional commands for pinning to a particular reference color and calculating deltaE, etc, which is what this functionality is designed for.

Here’s an example image that uses this technique to evaluate deltaE for a ColorChecker.
http://mike.russell-home.net/tmp/JohnC

Mike Russell
www.curvemeister.com
L
lurisia
May 11, 2006
It allows you to save multiple sample points and then write those samples out to an Excel spreadsheet file.

http://home.comcast.net/~larryscripts/Photoshop_CS/SaveColor Data.ZIP
There is a README.pdf file inside the zip file that contains instructions for setting up and using these script.

Larry,

In this script, you have to select the samply points. I am going to be using the same set of (x,y) points and getting the color data for those points on multiple images. Is there any way to automate the process? With your script, it seemed that you have to manually select the sample points each time. Am I missing something?

Thanks.
LS
Larry Scripts
May 12, 2006
There is a way to sample the color at a specific x,y coordinate. It is slow. You want to sample the same point in multiple files?
How do you want the output? You can put your photos into a folder and then I can process all the files in the folder and create an
Excel comma-delimited file. Is this what you need?

Larry
L
lurisia
May 12, 2006
There is a way to sample the color at a specific x,y coordinate. It is slow. You want to sample the same point in multiple files?
How do you want the output? You can put your photos into a folder and then I can process all the files in the folder and create an
Excel comma-delimited file. Is this what you need?

Yes. I want to sample the same *set* of points in multiple files. Excel output would be fine, but the output would need to include the filenames. Alternatively, and perhaps preferably, I could run the script on the current active file in PS. That is, click some sort of hot key, and then the script would spit out an excel file containing the color data at, for example, the following points:

(1,6)
(23,89)
(148,23)
etc.

Thanks for any further help,
cpp
LS
Larry Scripts
May 12, 2006
You don’t need a script. You can use the "Color Sampler" tool to sample up to 4 points. Open up the info palette. Select the "Color Sampler" tool and record an action. The X,Y coordinates will show in the info palette. Click and the color value with appear in the info palette.
Sample up to 4 points. Stop recording action. Open up another file and run the action you just made.
The color samples will appear in the info palette.

Larry
B
Batuhan
Jul 1, 2014
Larry i try to download your link but it is broken what ineed is a script to take every single pixels lab color values to excell is it possible

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

Related Discussion Topics

Nice and short text about related topics in discussion sections