Use Penpot color picker in Plugin

@Elena_Alcalde_Rueda If you want to use the same color picker like the one used in Penpot in a Plugin.
Is there a template where you can see how to do it?
Below the image of the color picker

@Paula can you help me with the thing above? Get no response from Elena…

Hello @BDV, sorry but i don’t understand your request, could you explain more?

@carolina.portugal What I mean is, when you create your own penpot plugin, you can use templates as a starting point. To me, it seems useful should a template exist where the Penpot default colour picker is used. So that you can use the same colour picker as in Penpot when creating a plugin. Only I can’t find this template directly. So the question is, is there a plugin template that uses the Penpot colour picker? If not, is it possible to create a template. If you need any further explanation please feel free to ask.

What you are probably looking for is not a “template”, but input styles for the color input field, as provided by penpot/plugin-styles (like for text input fields, see here).

From what I could find, there is no such styled color input field yet. I personally am interested in one as well, and for the time being I styled it myself. See the color picker component in color-picker.

Not the perfect solution, but good enough to work with. :slight_smile:

2 Likes

@malliaridis myself rather think that it is a template, but it is true that it would be useful if the colour input field could be found in the Penpot plugin styles.

The reason why I think it is a template is the following:

  • I don’t just want the input styles for the colour input field, I want the styles to rebuild the entire Penpot colour picker as shown in the first post. So it can be used in a plugin.
  • In the image of the Penpot Colour picker, number 1 is a colour picker, it would be useful if we could use the underlying code so that it is possible to manually pick a colour from the worksheet.
  • The same as above applies to recently chosen colours, choosing colour, …

In other words, you are able to use in a plugin identically the same colour picker currently used in Penpot.

@carolina.portugal Any chance to get an update on this topic?