meodai / poline

Esoteric Palette Generator Mico-Lib Interpolating HSL Color in cartesian space
https://meodai.github.io/poline/
MIT License
672 stars 33 forks source link

feat: Copy generated palette as CSS/JSON #13

Open jaredstanley opened 1 year ago

jaredstanley commented 1 year ago

Once a palette is generated, it would be very efficient to be able to copy the values in one click.

https://coolors.co/palette/cb997e-ddbea9-ffe8d6-b7b7a4-a5a58d-6b705c Note that coolors does this:

  1. visit a palette page
  2. click the v arrow next to the ❤️, click 'export palette'
  3. various options appear - css, JSON(or a js array), jpg, svg, etc.

While there are a lot of options in the example above, I assume developer/design professionals are the primary tool users, and would benefit from a 1-click css/json clipboard copy.

//css
------
/* CSS HEX */
--buff: #cb997eff;
--desert-sand: #ddbea9ff;

//json
-----
/* Array */
["cb997e","ddbea9","ffe8d6"]

/* Object */
{"Buff":"cb997e","Desert sand":"ddbea9","Champagne pink":"ffe8d6"}
meodai commented 1 year ago

Did something similar on FarbVèlo.

Screenshot 2023-02-24 at 01 45 32

Could probably reuse most of the code.