json-theme-even-fork/utils/colors.js

7 lines
238 B
JavaScript
Raw Normal View History

2023-09-04 02:29:45 +02:00
export default function colors(meta = {}) {
const { colors } = meta
return colors && Object.entries(colors)
.map(([name, [light, dark = light]]) => `--color-${name}-light:${light}; --color-${name}-dark:${dark};`)
.join(' ')
}