computed colors support

This commit is contained in:
Henry Jameson 2020-01-13 01:56:29 +02:00
parent 5881c13adc
commit 8d2f2866f6
6 changed files with 92 additions and 13 deletions

View file

@ -144,7 +144,11 @@ export const generateColors = (themeData) => {
// TODO: hack to keep rest of the code from complaining
value = '#FF00FF'
}
acc[k] = hex2rgb(value)
if (!value || value.startsWith('--')) {
acc[k] = value
} else {
acc[k] = hex2rgb(value)
}
}
return acc
}, {})