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: easier export handling #15

Open spencerc99 opened 1 year ago

spencerc99 commented 1 year ago

hi meodai, thanks for the great tool :) I have a couple ideas that I think would really help with using the site as a playground for generating colors and playing with them in your projects

currently, I play around with the playground and then highlight the color palette shown at bottom and "cmd + c" to copy it. This is a bit unideal because it copies out with colors and plaintext all on separate lines and "c" triggers the color picker.

Here's what I'm thinking

  1. don't trigger color picker if you are using cmd + c or ctrl + c
  2. add an "export" or "copy" button (similar to common improvements to code snippets) that formats out the color palette in a form that can be immediately used in css as variables with the color names (with possible variations for scss / less, etc.)

current paste result:

Ghoul Glint
Green Glint
#d7edc4
Fiddle-Leaf Fig
#a8c276
Ghoul
#61773b
Elite Teal
#10302d
Olympic Blue
#5f93d8

ideal paste result:

// Ghoul Glint Palette from https://meodai.github.io/poline/
$color-green-glint: #d7edc4;
$color-fiddle-leaf-fig: #a8c276;
$color-ghoul: #61773b;
$color-elite-teal: #10302d;
$color-olympic-blue: #5f93d8;

Also ideally, you could link back to the page with your settings to have a lightweight way of saving favorite palettes that you can go back and tinker with. I imagine you can support this by adding query params for every parameter in the playground and having a "copy permalink" button that saves that so as to not pollute the URL bar by default.

Happy to make a contribution for any of these if helpful. Thanks!

meodai commented 1 year ago

hey! thanks for reporting that, I think its related to #13. However this was never meant to me a tool, but a documentation for the the library that I build behind it.

Most people use it as tool though, as soon as I find some time, I will create a more tool-like version of it.