adobe / leonardo

Generate colors based on a desired contrast ratio
http://www.leonardocolor.io
Apache License 2.0
1.97k stars 108 forks source link

Export json color tokens with color family objects #184

Open markjharvey opened 2 years ago

markjharvey commented 2 years ago

Description

When creating color palettes, exporting by going to "Use > Design Tokens" only exports ALL the colors as a single json object. It would be helpful to export the palette with objects per color family (gray, blue, green, etc.).

Current

{
    "color": {
        "light": {
            "gray100": {
                    ...all the grays....
            },
...rest of colors....
            "yellow100": {
                    ....all the yellows....
        },
    }
}

Ask

{
    "color": {
        "light": {
            "gray": {
                "gray100": {
                    ...all the grays....
            },
...rest of colors....
            "yellow": {
                "yellow100": {
                    ....all the yellows....
        },
    }
}

Why do you need this feature?

When importing color tokens to Figma, having the color families in an object will help so they are not one large list in the Figma color styles. Updating this manually is very time consuming and actually breaks color style links.

Additional context

Screen Shot 2022-11-18 at 2 04 11 PM