Skip to main content
Inspiring
May 11, 2011
解決済み

possible to grab rgb value and output it on the image?

  • May 11, 2011
  • 返信数 3.
  • 2104 ビュー

Long story short...we have  thousands of images that we need to gather RGB info from that we'll  transfer to an excel doc.  Is it posisble to create a script that would  automatically color-pick a certain pixel position (i.e. 500, 500) and  output the 3 values somewhere on top of the image (like a huge text  layer)?  I'm just looking for a quick way to find out the RGB values of  these images without having to manually color pick each one.

I'd be grateful for any info on the subject.

Thanks!

このトピックへの返信は締め切られました。
解決に役立った回答 Paul Riggott

I have posted a script here ..

http://www.ps-scripts.com/bb/viewtopic.php?f=9&t=4117&sid=766cc720b24315eb55365013c418bbde

返信数 3

c.pfaffenbichler
Community Expert
Community Expert
May 12, 2011

How do you intend to create the final excel-document?

bsnyder175作成者
Inspiring
May 12, 2011

@thebestcpu:  I understand actions and batching well, but I don't know much about the analysis tool aside from using the ruler function.

@Paul Riggott:  amazing script.  You wrote just what I was looking for.  I have a few more questions about the script if you don't mind inserting these functions.

Could it place the text 35% down from the top center of the document, and could it also grab the filename of the current document and place that 25% down from the top center?

Thank you so much...what you've written is extremely helpful.

@c.pfaffenbichler:  the final excel doc has 3 columns:  R, G, and B.  I just intend to manually type the values into each cell.  The file names correspond to the rows, but they're broken up into categories.

In other words, the file name is based on:  "company_collection_color_number.jpg"...the file names will vary.  Sometimes there will be more or less catagories.  They refer to the columns in excel (one column is the company name, the next column is the collection name, the next column is the color, etc.  Does that make sense?

There isn't an automatic way to input the value into each cell based on a catagory such as number or color, is there?

Paul Riggott
Inspiring
May 12, 2011

The script has now been updated, hope it's now ok.

Paul Riggott
Paul Riggott解決!
Inspiring
May 12, 2011
bsnyder175作成者
Inspiring
May 12, 2011

For some reason, I'm unable to see the latest posts in this thread.  Something isn't updating properly.

Anyhow, Paul's script works wonderfully.  Thank you so much!

If anyone has any suggestions on a more efficient way to input the RGB values into an excel doc, I'm all ears.  But with that said, I'm completely satisfied with the script alone...I wans't sure if something like that was possible.

Thanks again!

May 12, 2011

If you have Photoshop Extended, have you thought about just using the Analysis tools with a one pixel selection all set up and run by an Action to position the selection and then just record a data measurement and then do this with a File > Automate > Batch where the files are loaded and run through the Action yet just closed and not saved.  Then just export the Log file and the directory of all the CSV files created.

Then you have your measurement information in a text file rather than having to read a text layer through another process.

Hope this helps - note I have not tried this in an action yet it should work.