eletrotupi / tcc/ frontend/constants/theme.tsaa9f316078c22a3cd681d3cef4743472fe1d1dad
4.8 KB | 216 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
import { Platform } from 'react-native';
7

8
// Primary Colors
9
const NEON_GREEN = '#13ec5b';
10
const PRIMARY_DARK = '#0f172a';
11

12
// Surface & Background
13
const BACKGROUND_LIGHT = '#f6f8f6';
14
const SURFACE_LIGHT = '#ffffff';
15
const BACKGROUND_DARK_GHOST = '#F8FAFC';
16

17
// Text Colors
18
const TEXT_PRIMARY = '#0f172a';
19
const TEXT_SECONDARY = '#64748b';
20
const TEXT_PLACEHOLDER = '#94A3B8';
21

22
// Borders & Accents
23
const BORDER_SUBTLE = '#f1f5f9';
24
const BORDER_SUBTLE_GRAY = '#E5E7EB';
25
const BORDER_SUBTLE_LIGHT_GRAY = '#CBD5E1';
26
const STATUS_ACTIVE_BG = 'rgba(19, 236, 91, 0.1)';
27

28
// Semantic Color Pills and stuff
29
const PILL_BLUE = '#dbeafe';
30
const PILL_INDIGO = '#e0e7ff';
31
const PILL_PURPLE = '#f3e8ff';
32

33
const tintColorLight = '#12ED5C';
34
const tintColorSecondary = '#618A70';
35
const black = '#0F172A';
36
const gray = '#475569';
37
const lightGray = '#64748B'
38

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

51
    // Interactive States
52
    icon: TEXT_SECONDARY,
53
    tabIconDefault: TEXT_SECONDARY,
54
    tabIconSelected: NEON_GREEN,
55

56
    // Form Inputs
57
    inputBackgroundColor: SURFACE_LIGHT,
58
    inputBackgroundDarkGhostColor: BACKGROUND_DARK_GHOST,
59
    inputBorderColor: BORDER_SUBTLE_GRAY,
60
    inputFocusBorderColor: NEON_GREEN,
61
    inputPlaceholderColor: TEXT_PLACEHOLDER,
62

63
    // Cards & Containers
64
    cardBackground: SURFACE_LIGHT,
65
    cardBorder: BORDER_SUBTLE,
66
    cardShadow: 'rgba(0, 0, 0, 0.05)',
67

68
    // Active / Inactive States
69
    activeBackground: STATUS_ACTIVE_BG,
70
    inactiveOpacity: 0.7,
71
    moodIntensityLabel: '#94a3b8',
72

73
    // Semantic Accents (for categorization)
74
    accentBlue: PILL_BLUE,
75
    accentIndigo: PILL_INDIGO,
76
    accentPurple: PILL_PURPLE,
77

78
    // Disabled / Secondary
79
    disabled: '#cbd5e1',
80
    divider: BORDER_SUBTLE,
81
    sliderTracking: '#E2E8F0',
82
    sliderLabels: '#94a3b8'
83
  },
84
};
85

86
export const Typography = {
87
  // Headlines
88
  headlineXg: {
89
    fontFamily: Platform.select({
90
      android: 'Inter_900Black',
91
      default: 'Inter',
92
    }),
93
    fontSize: 36,
94
    fontWeight: '900' as const,
95
    lineHeight: 40,
96
  },
97
  headlineLg: {
98
    fontFamily: Platform.select({
99
      android: 'Inter_900Black',
100
      default: 'Inter',
101
    }),
102
    fontSize: 20,
103
    fontWeight: '900' as const,
104
    lineHeight: 28,
105
    letterSpacing: -0.02,
106
  },
107
  headlineMd: {
108
    fontFamily: Platform.select({
109
      android: 'Inter',
110
      default: 'Inter',
111
    }),
112
    fontSize: 18,
113
    fontWeight: '700' as const,
114
    lineHeight: 24,
115
  },
116

117
  // Body
118
  bodyLg: {
119
    fontFamily: Platform.select({
120
      android: 'Inter',
121
      default: 'Inter',
122
    }),
123
    fontSize: 16,
124
    fontWeight: '700' as const,
125
    lineHeight: 20,
126
  },
127
  bodyMd: {
128
    fontFamily: Platform.select({
129
      android: 'Inter',
130
      default: 'Inter',
131
    }),
132
    fontSize: 14,
133
    fontWeight: '500' as const,
134
    lineHeight: 20,
135
  },
136

137
  // Labels
138
  labelSm: {
139
    fontFamily: Platform.select({
140
      android: 'Inter',
141
      default: 'Inter',
142
    }),
143
    fontSize: 12,
144
    fontWeight: '600' as const,
145
    lineHeight: 16,
146
    letterSpacing: 0.05,
147
  },
148

149
  // Used for the Slider labels
150
  labelXs: {
151
    fontFamily: Platform.select({
152
      android: 'Inter',
153
      default: 'Inter',
154
    }),
155
    fontSize: 10,
156
    lineHeight: 15,
157
    letterSpacing: 0.25
158
  }
159
};
160

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

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

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

201
export const Fonts = Platform.select({
202
  default: {
203
    sans: 'Inter',
204
    serif: 'serif',
205
    rounded: 'Inter',
206
    mono: 'monospace',
207
  },
208
});
209

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