adobe / adobe/leonardo

Export json color tokens with color family objects

Open
#184 0 comments 0 reactions 0 assignees View on GitHub
enhancement UI
Dominant language
JavaScript
Stars
2.1k
Forks
130
PR merge metrics
No merged PRs in 30d

Description

## 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](https://user-images.githubusercontent.com/9298383/202783191-9e49a056-d1f0-41f7-afb3-6bef83058287.png)

Contributor guide

Open the contributing guide

Research direction

Start from the “Use > Design Tokens” export flow described in the issue and trace how the color palette is converted to JSON. The work is done when colors are grouped into family objects such as gray, blue, green, and yellow, while preserving the existing token values and producing a structure suitable for Figma import.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
design
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.