persona-community-5/.pnpm-store/v3/files/5b/7bb3a9855dc69a88fa4e8ecb7481696a6d6cb83975aef2f1fe160727aaef74e66cf1a3e67c6853787cbcd9c87bbc4ed395d729264ba85bdee0af54aef43088
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

14 lines
410 B
Plaintext

const flattenColorPalette = (colors) =>
Object.assign(
{},
...Object.entries(colors ?? {}).flatMap(([color, values]) =>
typeof values == 'object'
? Object.entries(flattenColorPalette(values)).map(([number, hex]) => ({
[color + (number === 'DEFAULT' ? '' : `-${number}`)]: hex,
}))
: [{ [`${color}`]: values }]
)
)
export default flattenColorPalette