forked from ppy-sb/Guccho
-
Notifications
You must be signed in to change notification settings - Fork 0
/
daisyui.themes.ts
64 lines (61 loc) · 1.69 KB
/
daisyui.themes.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* eslint-env node */
// import * as convert from 'color-convert'
import { hex } from 'color-convert'
import themes from 'daisyui/src/theming/themes'
import tw from 'tailwindcss/colors'
import { hex as colors } from './src/palette'
import { convertSingle } from './src/utils/color'
const cupcake = themes.cupcake
const dracula = themes.dracula
const base = {
'--rounded-btn': '1rem',
'--btn-text-case': 'normal',
'--tab-border': '2px',
'--tab-radius': '.5rem',
'--tw-border-opacity': '0.2',
}
const slateHSL = convertSingle(tw.slate, hex.hsl, ([h, s, l]) => `${h} ${s}% ${l}%`)
const gSlate = {
'--color-gbase-50': slateHSL[50],
'--color-gbase-100': slateHSL[100],
'--color-gbase-200': slateHSL[200],
'--color-gbase-300': slateHSL[300],
'--color-gbase-400': slateHSL[400],
'--color-gbase-500': slateHSL[500],
'--color-gbase-600': slateHSL[600],
'--color-gbase-700': slateHSL[700],
'--color-gbase-800': slateHSL[800],
'--color-gbase-900': slateHSL[900],
'--color-gbase-950': slateHSL[950],
}
export const guccho = [
{
'guccho-light': {
...cupcake,
...base,
'primary': cupcake.secondary,
'secondary': cupcake.primary,
'neutral': tw.slate[200],
'base-50': tw.slate[50],
'base-100': tw.slate[100],
'base-200': tw.slate[200],
'base-300': tw.slate[300],
'base-content': tw.slate[900],
...gSlate,
},
},
{
'guccho-dark': {
...dracula,
...base,
'primary': colors.wewak[500],
'neutral': tw.slate[500],
'base-50': tw.slate[950],
'base-100': tw.slate[900],
'base-200': tw.slate[800],
'base-300': tw.slate[700],
'base-content': tw.slate[100],
...gSlate,
},
},
]