Add colors

This commit is contained in:
Sakura Knoll
2021-12-27 09:04:31 +09:00 Unverified
parent 492dbafbe5
commit b7b1a37e08
4 changed files with 27 additions and 23 deletions
+13
View File
@@ -0,0 +1,13 @@
import openColors from 'open-color'
export const colors = Object.entries(openColors)
.map(([colorName, colorObjectMap]) => {
return [colorName, Object.values(colorObjectMap) as string[]] as [
string,
string[]
]
})
.reduce<{ [key: string]: string[] }>((map, [colorName, colorArray]) => {
map[colorName] = colorArray
return map
}, {})