style: more colors.

This commit is contained in:
Julien Calixte
2019-08-23 10:41:40 +02:00
parent 93a17d4ef5
commit 6cb70d91ae
7 changed files with 49 additions and 6 deletions

View File

@@ -50,6 +50,16 @@ export const findDarkValue = (value: string): string | null => {
return find && find.darkValue ? find.darkValue : null
}
export const findLightValue = (value: string): string | null => {
if (!value) {
return null
}
const find: IColor | undefined = colors.find(
(color: IColor) => color.value === value
)
return find && find.lightValue ? find.lightValue : null
}
export const toHex = (text: string): string => {
return (
[...text]