Skip to content

Commit ab18285

Browse files
committed
feat: customize color template
1 parent f81defa commit ab18285

File tree

3 files changed

+308
-441
lines changed

3 files changed

+308
-441
lines changed

โ€Žsrc/styles/globalCss.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ import { defineGlobalStyles } from "@pandacss/dev";
33
export const globalCss = defineGlobalStyles({
44
":root": {
55
"--global-font-body": "var(--fonts-sans)",
6-
"&.dark": {
7-
backgroundColor: "black",
8-
},
6+
backgroundColor: "var(--colors-base)",
97
},
108
h1: {
119
fontSize: "var(--font-sizes-4xl)", // 2.25rem

โ€Žsrc/tokens/colors.mdx

Lines changed: 45 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -3,76 +3,21 @@ import { colors, semanticColors } from "./colors.ts";
33

44
# Colors
55

6-
## ์‹œ๋ฉ˜ํ‹ฑ ์ƒ‰์ƒ
7-
8-
๋‹ฌ๋ ˆ UI์˜ ๊ฐœ์„ฑ์„ ๋‚˜ํƒ€๋‚ด๋Š” ์ƒ‰์ƒ์ž…๋‹ˆ๋‹ค
6+
๋‹ฌ๋ ˆ UI์˜ ๊ทผ๊ฐ„์ด ๋˜๋Š” ์ƒ‰์ƒ ํŒ”๋ ˆํŠธ์ž…๋‹ˆ๋‹ค.
97

108
<ColorPalette>
119
<ColorItem
12-
title="์ฃผ์š”์ƒ‰"
13-
subtitle="semanticColors.primary"
14-
colors={{
15-
primary: semanticColors.primary.value,
16-
}}
17-
/>
18-
<ColorItem
19-
title="๋ณด์กฐ์ƒ‰"
20-
subtitle="semanticColors.secondary"
21-
colors={{
22-
secondary: semanticColors.secondary.value,
23-
}}
24-
/>
25-
<ColorItem
26-
title="๋ฐฐ๊ฒฝ์ƒ‰"
27-
subtitle="semanticColors.bg"
28-
colors={Object.fromEntries(
29-
Object.entries(semanticColors.bg).map(([name, { value }]) => [
30-
name,
31-
value,
32-
])
33-
)}
34-
/>
35-
<ColorItem
36-
title="๊ธ€์ž์ƒ‰"
37-
subtitle="semanticColors.text"
38-
colors={{
39-
light: semanticColors.text.value.base,
40-
dark: semanticColors.text.value._dark,
41-
}}
42-
/>
43-
</ColorPalette>
44-
45-
## ์ƒ‰์ƒ ํŒ”๋ ˆํŠธ
46-
47-
TailwindCSS์˜ ์ƒ‰์ƒ ํŒ”๋ ˆํŠธ๋ฅผ ๊ทธ๋Œ€๋กœ ์ฐจ์šฉํ•ฉ๋‹ˆ๋‹ค.
48-
49-
<ColorPalette>
50-
<ColorItem
51-
title="๋กœ์ฆˆ"
52-
subtitle="colors.rose"
53-
colors={Object.fromEntries(
54-
Object.entries(colors.rose).map(([name, { value }]) => [name, value])
55-
)}
56-
/>
57-
<ColorItem
58-
title="ํ•‘ํฌ"
59-
subtitle="colors.pink"
60-
colors={Object.fromEntries(
61-
Object.entries(colors.pink).map(([name, { value }]) => [name, value])
62-
)}
63-
/>
64-
<ColorItem
65-
title="ํ‘ธํฌ์‹œ์•„"
66-
subtitle="colors.fuchsia"
10+
title="์ดˆ๋ก"
11+
subtitle="colors.teal"
6712
colors={Object.fromEntries(
68-
Object.entries(colors.fuchsia).map(([name, { value }]) => [name, value])
13+
Object.entries(colors.teal).map(([name, { value }]) => [name, value])
6914
)}
7015
/>
7116
<ColorItem
72-
title="ํผํ”Œ"
73-
subtitle="colors.purple"
17+
title="์ดˆ๋ก (dark)"
18+
subtitle="colors.tealDark"
7419
colors={Object.fromEntries(
75-
Object.entries(colors.purple).map(([name, { value }]) => [name, value])
20+
Object.entries(colors.tealDark).map(([name, { value }]) => [name, value])
7621
)}
7722
/>
7823
<ColorItem
@@ -83,122 +28,73 @@ TailwindCSS์˜ ์ƒ‰์ƒ ํŒ”๋ ˆํŠธ๋ฅผ ๊ทธ๋Œ€๋กœ ์ฐจ์šฉํ•ฉ๋‹ˆ๋‹ค.
8328
)}
8429
/>
8530
<ColorItem
86-
title="์ธ๋””๊ณ "
87-
subtitle="colors.indigo"
31+
title="๋ณด๋ผ (dark)"
32+
subtitle="colors.violetDark"
8833
colors={Object.fromEntries(
89-
Object.entries(colors.indigo).map(([name, { value }]) => [name, value])
90-
)}
91-
/>
92-
<ColorItem
93-
title="๋ธ”๋ฃจ"
94-
subtitle="colors.blue"
95-
colors={Object.fromEntries(
96-
Object.entries(colors.blue).map(([name, { value }]) => [name, value])
97-
)}
98-
/>
99-
<ColorItem
100-
title="์Šค์นด์ด"
101-
subtitle="colors.sky"
102-
colors={Object.fromEntries(
103-
Object.entries(colors.sky).map(([name, { value }]) => [name, value])
104-
)}
105-
/>
106-
<ColorItem
107-
title="์‹ธ์ด์–ธ"
108-
subtitle="colors.cyan"
109-
colors={Object.fromEntries(
110-
Object.entries(colors.cyan).map(([name, { value }]) => [name, value])
111-
)}
112-
/>
113-
<ColorItem
114-
title="ํ‹ธ"
115-
subtitle="colors.teal"
116-
colors={Object.fromEntries(
117-
Object.entries(colors.teal).map(([name, { value }]) => [name, value])
118-
)}
119-
/>
120-
<ColorItem
121-
title="์—๋จธ๋ž„๋“œ"
122-
subtitle="colors.emerald"
123-
colors={Object.fromEntries(
124-
Object.entries(colors.emerald).map(([name, { value }]) => [name, value])
125-
)}
126-
/>
127-
<ColorItem
128-
title="๊ทธ๋ฆฐ"
129-
subtitle="colors.green"
130-
colors={Object.fromEntries(
131-
Object.entries(colors.green).map(([name, { value }]) => [name, value])
132-
)}
133-
/>
134-
<ColorItem
135-
title="๋ผ์ž„"
136-
subtitle="colors.lime"
137-
colors={Object.fromEntries(
138-
Object.entries(colors.lime).map(([name, { value }]) => [name, value])
139-
)}
140-
/>
141-
<ColorItem
142-
title="์˜๋กœ์šฐ"
143-
subtitle="colors.yellow"
144-
colors={Object.fromEntries(
145-
Object.entries(colors.yellow).map(([name, { value }]) => [name, value])
146-
)}
147-
/>
148-
<ColorItem
149-
title="์•ฐ๋ฒ„"
150-
subtitle="colors.amber"
151-
colors={Object.fromEntries(
152-
Object.entries(colors.amber).map(([name, { value }]) => [name, value])
153-
)}
154-
/>
155-
<ColorItem
156-
title="์˜ค๋ Œ์ง€"
157-
subtitle="colors.orange"
158-
colors={Object.fromEntries(
159-
Object.entries(colors.orange).map(([name, { value }]) => [name, value])
34+
Object.entries(colors.violetDark).map(([name, { value }]) => [
35+
name,
36+
value,
37+
])
16038
)}
16139
/>
16240
<ColorItem
163-
title="๋ ˆ๋“œ"
41+
title="๋นจ๊ฐ•"
16442
subtitle="colors.red"
16543
colors={Object.fromEntries(
16644
Object.entries(colors.red).map(([name, { value }]) => [name, value])
16745
)}
16846
/>
16947
<ColorItem
170-
title="๋„ค์ธ„๋Ÿด"
171-
subtitle="colors.neutral"
48+
title="๋นจ๊ฐ• (dark)"
49+
subtitle="colors.redDark"
17250
colors={Object.fromEntries(
173-
Object.entries(colors.neutral).map(([name, { value }]) => [name, value])
51+
Object.entries(colors.redDark).map(([name, { value }]) => [name, value])
17452
)}
17553
/>
17654
<ColorItem
177-
title="์Šคํ†ค"
178-
subtitle="colors.stone"
55+
title="๋…ธ๋ž‘"
56+
subtitle="colors.yellow"
17957
colors={Object.fromEntries(
180-
Object.entries(colors.stone).map(([name, { value }]) => [name, value])
58+
Object.entries(colors.yellow).map(([name, { value }]) => [name, value])
18159
)}
18260
/>
18361
<ColorItem
184-
title="์ง•ํฌ"
185-
subtitle="colors.zinc"
62+
title="๋…ธ๋ž‘ (dark)"
63+
subtitle="colors.yellowDark"
18664
colors={Object.fromEntries(
187-
Object.entries(colors.zinc).map(([name, { value }]) => [name, value])
65+
Object.entries(colors.yellowDark).map(([name, { value }]) => [
66+
name,
67+
value,
68+
])
18869
)}
18970
/>
19071
<ColorItem
191-
title="๊ทธ๋ ˆ์ด"
72+
title="ํšŒ์ƒ‰"
19273
subtitle="colors.gray"
19374
colors={Object.fromEntries(
19475
Object.entries(colors.gray).map(([name, { value }]) => [name, value])
19576
)}
19677
/>
19778
<ColorItem
198-
title="์Šฌ๋ ˆ์ดํŠธ"
199-
subtitle="colors.slate"
79+
title="ํšŒ์ƒ‰ (dark)"
80+
subtitle="colors.grayDark"
20081
colors={Object.fromEntries(
201-
Object.entries(colors.slate).map(([name, { value }]) => [name, value])
82+
Object.entries(colors.grayDark).map(([name, { value }]) => [name, value])
20283
)}
20384
/>
20485
</ColorPalette>
86+
87+
์šฉ๋„์— ๋”ฐ๋ผ์„œ ๊ฐ ์ƒ‰์ƒ์€ 12๊ฐ€์ง€ ์Šค์ผ€์ผ๋กœ ๋ถ„๋ฆฌ๋ฉ๋‹ˆ๋‹ค.
88+
89+
- Scale 1: ํŽ˜์ด์ง€ ๋ฐฐ๊ฒฝ
90+
- Scale 2: ์˜ˆ๋น„
91+
- Scale 3: ์ปดํฌ๋„ŒํŠธ ๋ฐฐ๊ฒฝ
92+
- Scale 4: ์ปดํฌ๋„ŒํŠธ ๋ฐฐ๊ฒฝ (hover)
93+
- Scale 5: ์ปดํฌ๋„ŒํŠธ ๋ฐฐ๊ฒฝ (active)
94+
- Scale 6: ์˜ˆ๋น„
95+
- Scale 7: ๊ฒฝ๊ณ„
96+
- Scale 8: ๊ฒฝ๊ณ„ (hover)
97+
- Scale 9: ์†”๋ฆฌ๋“œ ๋ฐฐ๊ฒฝ
98+
- Scale 10: ์†”๋ฆฌ๋“œ ๋ฐฐ๊ฒฝ (hover)
99+
- Scale 11: ๊ธ€์ž (low contrast)
100+
- Scale 12: ๊ธ€์ž (high contrast)

0 commit comments

Comments
ย (0)