Skip to main content
Inspiring
September 22, 2014
Question

Swatches name from color values

  • September 22, 2014
  • 12 replies
  • 2716 views

Hi all,

How can we get the swatch name from its color value?

I looked into the photoshop scripting APIs but couldn't find anything related to swatches.

Thanks for any help..

This topic is closed to new replies. Start a new post to keep the conversation going.

12 replies

c.pfaffenbichler
Community Expert
Community Expert
September 22, 2014
How can we get the swatch name from its color value?

Please elaborate.

Inspiring
September 23, 2014

Thanks for the reply,

.

Here is a swatch name 'RGB Green' with the color value rgb(0, 255, 0). Now what I want here is that, I have rgb() values and I want to get the name of the swatches that the document have corresponding to those rgb values.

Does it make sense?

Actually I have a selected object and I am getting its fill color and from that color value I want to get the swatch name if any.

Thanks..

c.pfaffenbichler
Community Expert
Community Expert
September 23, 2014

I have rgb() values and I want to get the name of the swatches that the document have corresponding to those rgb values.

As far as I can tell Photoshop Documents don’t have Swatches, the Application does.

But semantics aside I suspect the task might be a problematic one.

Have you looked around on ps-script.com yet?

ps-scripts.com • View topic - Managing Color Swatches