Hi,
I have for an customer his CD Colors as palette in different formats like:
is there any which I can use to import in Penpot?
Best
Hi,
I have for an customer his CD Colors as palette in different formats like:
Best
If the JSON format is formatted for design tokens, then you can import that into Penpot in the Tokens panel.
If that doesn’t work, you can share the JSON file here, and I can walk you through making that file work for design tokens.
Hi,
thanks for your reply and proposal.
My json file have this structure:
{
"name": "Company Colorplalette",
"colors": [
{
"name": "Black",
"hex": "#000000",
},
]
}
Best
Great. So Penpot won’t accept that format, but it won’t take much changing to work. The minimum format that Penpot will accept has this structure:
{
"Company Colorpalette": {
"Black": {
"$value": "#000000",
"$type": "color",
"$description": ""
},
"Purple": {
"$value": "#8F0177",
"$type": "color",
"$description": ""
}
},
"$metadata": {
"tokenSetOrder": [
"Company Colorpalette"
]
}
}
This will ensure your color tokens will be imported into a token set named “Company Colorpalette”. (Which you can easily rename later.)
Technically, you could just import the colors formatted without a set and it would still work:
{
"Black": {
"$value": "#000000",
"$type": "color",
"$description": ""
},
"Purple": {
"$value": "#8F0177",
"$type": "color",
"$description": ""
}
}