LeaVerou / css.land

Hands on CSS demos
https://css.land
MIT License
225 stars 17 forks source link

Export? #11

Open anitagraham opened 4 years ago

anitagraham commented 4 years ago

Would it be possible to have a function which exports the saved colours?

I've taken a screenshot, but that seems the least useful. Happy to help (time, time, time)

LeaVerou commented 4 years ago

What kind of export format did you envision?

anitagraham commented 4 years ago

So many choices!

While my first thought was SCSS/CSS, perhaps Json would be better.

Notes

[
  {
    "name": "dark muted red",
    "lch": "lch(24.761% 33.195 36.216)",
    "rgb": "rgb(38.7% 15.56% 12.06%)",
    "p3": "color(display-p3 0.3586 0.1693 0.1331)",
    "rec2020": "color(rec2020 0.2947 0.1483 0.0719)"
  },
  {
    "name": "red",
    "lch": "lch(51.761% 91.195 36.216)",
    "rgb": "rgb(92.94% 12.16% 14.12%)",
    "p3": "color(display-p3 0.8538 0.2248 0.1948)",
    "rec2020": "color(rec2020 0.7489 0.2666 0.1588)"
  }
]
LeaVerou commented 4 years ago

Oh cool, import/export is actually built-in to Mavo so it's trivial to add, it's just a matter of styling!