# Color picking question

**URL:** <https://forums.creativeclouddeveloper.com/t/color-picking-question/1466>\
**Category:** UXP Plugin API\
**Created:** [December 7, 2019, 10:39am UTC](https://forums.creativeclouddeveloper.com/t/color-picking-question/1466 "2019-12-07T10:39:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArcSlash](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@ArcSlash](https://forums.creativeclouddeveloper.com/u/ArcSlash)\
**Post date:** [December 7, 2019, 10:39am UTC](https://forums.creativeclouddeveloper.com/t/color-picking-question/1466/1 "2019-12-07T10:39:37Z")

</div>

Hi everyone!

So I want to prompt the user to supply a color of his choosing for my plugin. I checked the APIs and posts on the topic and there are two possibilities I came up with:

1. I place an input textfield on my panel to get the RGB hexcode of the color (kinda bleh imo),
2. Get one of the colors in the assets panel, since I can directly access it.

Problem with the second option is how do I know which color asset the user wants? Is there a selected\_color\_asset or similar attribute somewhere?  
What would you suggest, from a usability standpoint, when querying a particular color from the user?

Thanks!  
Marcell

---

<div class="post-metadata">

**Author:** ![pklaschka](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/pklaschka/32/3162_2.png) [@pklaschka](https://forums.creativeclouddeveloper.com/u/pklaschka)\
**Post date:** [December 7, 2019, 11:51am UTC](https://forums.creativeclouddeveloper.com/t/color-picking-question/1466/2 "2019-12-07T11:51:24Z")

</div>

He @ArcSlash,

what I would suggest would be a dropdown/select box, where the user can select either a color from the assets panel or “custom”, in which case below, an input where the user can enter a custom hex code, appears. This gives the most flexibility with a reasonable amount of work for how it is right now, in my opinion.

Hopefully, a color input will get implemented for XD relatively soon (cf. [Color picker in plugin UI](http://forums.creativeclouddeveloper.com/t/color-picker-in-plugin-ui/635/3)), in which case we’ll just be able to use that…

I hope this helps,  
Happy coding,  
Pablo

---

<div class="post-metadata">

**Author:** ![Velara](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/velara/32/1278_2.png) [@Velara](https://forums.creativeclouddeveloper.com/u/Velara)\
**Post date:** [July 12, 2021, 2:56am UTC](https://forums.creativeclouddeveloper.com/t/color-picking-question/1466/3 "2021-07-12T02:56:25Z")

</div>

If it’s possible, I’d like to see the XD color picker open for consistency.
