website icon indicating copy to clipboard operation
website copied to clipboard

[feat] ability to copy colors as JS objects

Open itsjavi opened this issue 4 months ago • 0 comments

Feature request

Overview

In the custom colors generator page, it would be super helpful to be able to copy all the colors as JS (and/or JSON), in a similar format as the colors inside @radix-ui/colors source code.

Examples in other libraries or sites

These examples are for generating Tailwind palettes, but offer different ways of exporting the colors:

  • https://www.tailwindshades.com/
  • https://uicolors.app/create

image

Who does this impact? Who is this for?

It's very handy for devs using CSS-in-JS who need to generate color tokens, e.g. with Panda CSS, Tailwind, Park UI, Ark UI, etc.

Additional context

I spent a quite some time converting the generated CSS to JS (reduced thanks to https://transform.tools/css-to-js), because I have an extensive color palette.

itsjavi avatar Apr 01 '24 00:04 itsjavi