eletrotupi / tcc/ frontend/constants/theme.ts7297420aad1753346ef6006a3a252a80f56ae4c2
4.7 KB | 215 lines Raw
1
/**
2
 * Below are the colors that are used in the app. The colors are defined in the light and dark mode.
3
 * There are many other ways to style your app. For example, [Nativewind](https://www.nativewind.dev/), [Tamagui](https://tamagui.dev/), [unistyles](https://reactnativeunistyles.vercel.app), etc.
4
 */
5

6
// Primary Colors
7
const NEON_GREEN = "#13ec5b";
8
const PRIMARY_DARK = "#0f172a";
9

10
// Surface & Background
11
const BACKGROUND_LIGHT = "#f6f8f6";
12
const BACKGROUND_DARK_GHOST = "#F8FAFC";
13

14
// Text Colors
15
const TEXT_PRIMARY = "#0f172a";
16
const TEXT_SECONDARY = "#64748b";
17
const TEXT_PLACEHOLDER = "#94A3B8";
18

19
// Borders & Accents
20
const BORDER_SUBTLE = "#f1f5f9";
21
const BORDER_SUBTLE_GRAY = "#E5E7EB";
22
const BORDER_SUBTLE_LIGHT_GRAY = "#CBD5E1";
23
const STATUS_ACTIVE_BG = "rgba(19, 236, 91, 0.1)";
24

25
// Semantic Color Pills and stuff
26
const PILL_BLUE = "#dbeafe";
27
const PILL_INDIGO = "#e0e7ff";
28
const PILL_PURPLE = "#f3e8ff";
29

30
const tintColorLight = "#12ED5C";
31
const tintColorSecondary = "#618A70";
32
const GRAY = "#475569";
33
const LIGHT_GRAY = "#64748B";
34
const LIGHT_SLATE_GRAY = "#94A3B8";
35
const PURE_WHITE = "#FFFFFF";
36

37
export const Colors = {
38
  light: {
39
    // Primary Actions & Focus
40
    text: TEXT_PRIMARY,
41
    textSecondary: TEXT_SECONDARY,
42
    background: BACKGROUND_LIGHT,
43
    surface: PURE_WHITE,
44
    tint: NEON_GREEN,
45
    backgroundDarkGhost: BACKGROUND_DARK_GHOST,
46
    borderDashed: BORDER_SUBTLE_LIGHT_GRAY,
47
    smallAddButtonIcon: BORDER_SUBTLE_LIGHT_GRAY,
48

49
    // Secondary
50
    neutral: '#6F7A6D',
51
    //secondaryBackground: '#E0EBDB',
52
    secondaryBackground: '#0EB545',
53

54
    // Interactive States
55
    icon: TEXT_SECONDARY,
56
    tabIconDefault: TEXT_SECONDARY,
57
    tabIconSelected: NEON_GREEN,
58

59
    // Form Inputs
60
    inputBackgroundColor: PURE_WHITE,
61
    inputBackgroundDarkGhostColor: BACKGROUND_DARK_GHOST,
62
    inputBorderColor: BORDER_SUBTLE_GRAY,
63
    inputFocusBorderColor: NEON_GREEN,
64
    inputPlaceholderColor: TEXT_PLACEHOLDER,
65

66
    // Cards & Containers
67
    cardBackground: PURE_WHITE,
68
    cardBorder: BORDER_SUBTLE,
69
    cardShadow: "rgba(0, 0, 0, 0.05)",
70

71
    // Active / Inactive States
72
    activeBackground: STATUS_ACTIVE_BG,
73
    inactiveOpacity: 0.7,
74
    moodIntensityLabel: "#94a3b8",
75

76
    // Semantic Accents (for categorization)
77
    accentBlue: PILL_BLUE,
78
    accentIndigo: PILL_INDIGO,
79
    accentPurple: PILL_PURPLE,
80
    accentDarkPurple: "#7F77DD",
81

82
    // Some grays
83
    white: PURE_WHITE,
84
    gray: GRAY,
85
    lightGray: LIGHT_GRAY,
86
    lightSlateGray: LIGHT_SLATE_GRAY,
87
    black: PRIMARY_DARK,
88

89
    // Disabled / Secondary
90
    disabled: "#cbd5e1",
91
    divider: BORDER_SUBTLE,
92
    sliderTracking: "#E2E8F0",
93
    sliderLabels: "#94a3b8",
94
    warning: "orange",
95
    success: "#22c55e",
96
    danger: "#EF4444",
97
    textBlack: PRIMARY_DARK,
98
  },
99
};
100

101
export const Typography = {
102
  // Headlines
103
  headlineXg: {
104
    fontFamily: "Inter",
105
    fontSize: 36,
106
    fontWeight: "900" as const,
107
    lineHeight: 40,
108
  },
109
  headlineLg: {
110
    fontFamily: "Inter",
111
    fontSize: 20,
112
    fontWeight: "900" as const,
113
    lineHeight: 28,
114
    letterSpacing: -0.02,
115
  },
116
  headlineMd: {
117
    fontFamily: "Inter",
118
    fontSize: 18,
119
    fontWeight: "700" as const,
120
    lineHeight: 24,
121
  },
122

123
  // Body
124
  bodyLg: {
125
    fontFamily: "Inter",
126
    fontSize: 16,
127
    fontWeight: "700" as const,
128
    lineHeight: 20,
129
  },
130
  bodyMd: {
131
    fontFamily: "Inter",
132
    fontSize: 14,
133
    fontWeight: "500" as const,
134
    lineHeight: 20,
135
  },
136

137
  // Labels
138
  labelSm: {
139
    fontFamily: "Inter",
140
    fontSize: 12,
141
    fontWeight: "600" as const,
142
    lineHeight: 16,
143
    letterSpacing: 0.05,
144
  },
145

146
  // Used for the Slider labels
147
  labelXs: {
148
    fontFamily: "Inter",
149
    fontSize: 10,
150
    lineHeight: 15,
151
    letterSpacing: 0.25,
152
  },
153

154
  cardHint: {
155
    fontFamily: "Inter",
156
    fontSize: 11,
157
    lineHeight: 13.8,
158
    fontStyle: "italic",
159
  },
160
};
161

162
export const Spacing = {
163
  containerPadding: 16, // 1rem
164
  sectionGap: 32, // 2rem
165
  inlineGapSm: 8, // 0.5rem
166
  cardGap: 12, // 0.75rem
167
};
168

169
export const BorderRadius = {
170
  sm: 4, // 0.25rem
171
  default: 8, // 0.5rem
172
  md: 12, // 0.75rem
173
  lg: 16, // 1rem
174
  xl: 24, // 1.5rem
175
  full: 9999, // pill-shaped
176
};
177

178
export const Shadows = {
179
  sm: {
180
    shadowColor: "#000000",
181
    shadowOffset: { width: 0, height: 1 },
182
    shadowOpacity: 0.05,
183
    shadowRadius: 2,
184
    elevation: 2,
185
  },
186
  md: {
187
    shadowColor: "#000000",
188
    shadowOffset: { width: 0, height: 4 },
189
    shadowOpacity: 0.1,
190
    shadowRadius: 8,
191
    elevation: 4,
192
  },
193
  lg: {
194
    shadowColor: NEON_GREEN,
195
    shadowOffset: { width: 0, height: 8 },
196
    shadowOpacity: 0.15,
197
    shadowRadius: 16,
198
    elevation: 8,
199
  },
200
};
201

202
export const Fonts = {
203
  sans: "Inter",
204
  serif: "serif",
205
  rounded: "Inter",
206
  mono: "monospace",
207
};
208

209
export const Theme = {
210
  colors: Colors,
211
  typography: Typography,
212
  spacing: Spacing,
213
  shadows: Shadows,
214
  borderRadius: BorderRadius,
215
};