Photoshop: Can users pick a color from my extension/HTML panel?

  • 1
  • Question
  • Updated 3 years ago
  • Answered
  • (Edited)
Can I allow user to pick colors using color picker from my extension content?
Photo of Paweł Magiera

Paweł Magiera

  • 13 Posts
  • 0 Reply Likes

Posted 3 years ago

  • 1
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 780 Reply Likes
Yes, of course -- several extension panels already do so.
Photo of Paweł Magiera

Paweł Magiera

  • 13 Posts
  • 0 Reply Likes
OK, but how? When I open color picker I can't pick color from extension content, only from document content.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 780 Reply Likes
Your scripting code sets the foreground or background color in Photoshop.
You can set the color value, or use the color picker to get a color value that you then set.
Photo of Paweł Magiera

Paweł Magiera

  • 13 Posts
  • 0 Reply Likes
But imagine someone wants to pick color from colors in my extension. They are for example changing drop shadow and they opened color picker and now they want to pick color from my extension. They can't pick it from there.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 780 Reply Likes
Yes, once the modal color picker dialog is open, there is no way to communicate with an extension panel to pick colors from the panel (other than the usual click in the document and drag to capture any color on the screen).
Photo of Paweł Magiera

Paweł Magiera

  • 13 Posts
  • 0 Reply Likes
And that's what I wanted to do. :( Thanks anyway!