Color picking question

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

1 Like

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), in which case we’ll just be able to use that…

I hope this helps,
Happy coding,
Pablo

3 Likes

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