Skip to content

Commit ccddc43

Browse files
committed
feat: add color object
1 parent a1d1829 commit ccddc43

2 files changed

Lines changed: 85 additions & 2 deletions

File tree

src/types/ColorThemeTypes.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
export interface SwitchColors {
2+
trackOff: string;
3+
trackOn: string;
4+
thumbOff: string;
5+
thumbOn: string;
6+
}
7+
8+
export interface ThemeColors {
9+
background: string;
10+
foreground: string;
11+
border: string;
12+
checkboxBorder: string;
13+
input: string;
14+
mutedForeground: string;
15+
primary: string;
16+
accent: string;
17+
ring: string;
18+
destructive: string;
19+
search: string;
20+
switch: SwitchColors;
21+
}
22+
23+
export interface ColorTheme {
24+
light: ThemeColors;
25+
dark: ThemeColors;
26+
}

src/utils/colorTheme.ts

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,83 @@
11
import { vars } from 'nativewind';
22

3+
import { ColorTheme } from '../types/ColorThemeTypes';
4+
35
export const themes = {
46
light: vars({
57
'--color-background': '#ffffff',
68
'--color-foreground': '#0f1419',
79
'--color-border': '#eff3f4',
10+
'--color-checkbox-border': '#687e8b',
811
'--color-input': '#d1d9de',
912
'--color-muted-foreground': '#536471',
1013
'--color-primary': '#007bff',
1114
'--color-accent': '#f7f9f9',
1215
'--color-ring': '#888a8c',
1316
'--color-destructive': '#f4212e',
17+
'--color-search': '#ECF3F1',
18+
19+
'--color-switch-track-off': '#BBBDBB',
20+
'--color-switch-track-on': '#BFE3F9',
21+
'--color-switch-thumb-off': '#E9ECE9',
22+
'--color-switch-thumb-on': '#0E90ED',
1423
}),
1524
dark: vars({
1625
'--color-background': '#000000',
1726
'--color-foreground': '#e7e9ea',
18-
'--color-border': '#303336',
27+
'--color-border': '#515D62',
28+
'--color-checkbox-border': '#8CA1AA',
1929
'--color-input': '#536471',
2030
'--color-muted-foreground': '#71767b',
21-
'--color-primary': '#007bff',
31+
'--color-primary': '#1194F2',
2232
'--color-accent': '#16181c',
2333
'--color-ring': '#f7f9fa',
2434
'--color-destructive': '#82181a',
35+
'--color-search': '#1c2324',
36+
37+
'--color-switch-track-off': '#4B4E4B',
38+
'--color-switch-track-on': '#042d48',
39+
'--color-switch-thumb-off': '#B6B9B6',
40+
'--color-switch-thumb-on': '#0e90ed',
2541
}),
2642
};
43+
44+
export const colors: ColorTheme = {
45+
light: {
46+
background: '#ffffff',
47+
foreground: '#0f1419',
48+
border: '#eff3f4',
49+
checkboxBorder: '#687e8b',
50+
input: '#d1d9de',
51+
mutedForeground: '#536471',
52+
primary: '#007bff',
53+
accent: '#f7f9f9',
54+
ring: '#888a8c',
55+
destructive: '#f4212e',
56+
search: '#ECF3F1',
57+
switch: {
58+
trackOff: '#BBBDBB',
59+
trackOn: '#BFE3F9',
60+
thumbOff: '#E9ECE9',
61+
thumbOn: '#0E90ED',
62+
},
63+
},
64+
dark: {
65+
background: '#000000',
66+
foreground: '#e7e9ea',
67+
border: '#515D62',
68+
checkboxBorder: '#8CA1AA',
69+
input: '#536471',
70+
mutedForeground: '#71767b',
71+
primary: '#007bff',
72+
accent: '#16181c',
73+
ring: '#f7f9fa',
74+
destructive: '#82181a',
75+
search: '#1c2324',
76+
switch: {
77+
trackOff: '#4B4E4B',
78+
trackOn: '#042d48',
79+
thumbOff: '#B6B9B6',
80+
thumbOn: '#0e90ed',
81+
},
82+
},
83+
};

0 commit comments

Comments
 (0)