poline icon indicating copy to clipboard operation
poline copied to clipboard

feat: Copy generated palette as CSS/JSON

Open jaredstanley opened this issue 2 years ago • 1 comments

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"}

jaredstanley avatar Feb 23 '23 20:02 jaredstanley

Did something similar on FarbVèlo. Screenshot 2023-02-24 at 01 45 32

Could probably reuse most of the code.

meodai avatar Feb 24 '23 00:02 meodai