eletrotupi / tcc/ frontend/constants/theme.tsc49da6aaf11d18081de98784bdfc1ece1bf763de
4.2 KB | 191 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 STATUS_ACTIVE_BG = 'rgba(19, 236, 91, 0.1)';
26

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

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

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

48
    // Interactive States
49
    icon: TEXT_SECONDARY,
50
    tabIconDefault: TEXT_SECONDARY,
51
    tabIconSelected: NEON_GREEN,
52

53
    // Form Inputs
54
    inputBackgroundColor: SURFACE_LIGHT,
55
    inputBackgroundDarkGhostColor: BACKGROUND_DARK_GHOST,
56
    inputBorderColor: BORDER_SUBTLE_GRAY,
57
    inputFocusBorderColor: NEON_GREEN,
58
    inputPlaceholderColor: TEXT_PLACEHOLDER,
59

60
    // Cards & Containers
61
    cardBackground: SURFACE_LIGHT,
62
    cardBorder: BORDER_SUBTLE,
63
    cardShadow: 'rgba(0, 0, 0, 0.05)',
64

65
    // Active / Inactive States
66
    activeBackground: STATUS_ACTIVE_BG,
67
    inactiveOpacity: 0.7,
68

69
    // Semantic Accents (for categorization)
70
    accentBlue: PILL_BLUE,
71
    accentIndigo: PILL_INDIGO,
72
    accentPurple: PILL_PURPLE,
73

74
    // Disabled / Secondary
75
    disabled: '#cbd5e1',
76
    divider: BORDER_SUBTLE,
77
  },
78
};
79

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

111
  // Body
112
  bodyLg: {
113
    fontFamily: Platform.select({
114
      android: 'Inter',
115
      default: 'Inter',
116
    }),
117
    fontSize: 16,
118
    fontWeight: '700' as const,
119
    lineHeight: 20,
120
  },
121
  bodyMd: {
122
    fontFamily: Platform.select({
123
      android: 'Inter',
124
      default: 'Inter',
125
    }),
126
    fontSize: 14,
127
    fontWeight: '500' as const,
128
    lineHeight: 20,
129
  },
130
  
131
  // Labels
132
  labelSm: {
133
    fontFamily: Platform.select({
134
      android: 'Inter',
135
      default: 'Inter',
136
    }),
137
    fontSize: 12,
138
    fontWeight: '600' as const,
139
    lineHeight: 16,
140
    letterSpacing: 0.05,
141
  },
142
};
143

144
export const Spacing = {
145
  containerPadding: 16, // 1rem
146
  sectionGap: 32, // 2rem
147
  inlineGapSm: 8, // 0.5rem
148
  cardGap: 12 // 0.75rem
149
};
150

151
export const BorderRadius = {
152
  sm: 4, // 0.25rem
153
  default: 8, // 0.5rem
154
  md: 12, // 0.75rem
155
  lg: 16, // 1rem
156
  xl: 24, // 1.5rem
157
  full: 9999, // pill-shaped
158
};
159

160
export const Shadows = {
161
  sm: {
162
    shadowColor: '#000000',
163
    shadowOffset: { width: 0, height: 1 },
164
    shadowOpacity: 0.05,
165
    shadowRadius: 2,
166
    elevation: 2,
167
  },
168
  md: {
169
    shadowColor: '#000000',
170
    shadowOffset: { width: 0, height: 4 },
171
    shadowOpacity: 0.1,
172
    shadowRadius: 8,
173
    elevation: 4,
174
  },
175
  lg: {
176
    shadowColor: NEON_GREEN,
177
    shadowOffset: { width: 0, height: 8 },
178
    shadowOpacity: 0.15,
179
    shadowRadius: 16,
180
    elevation: 8,
181
  },
182
};
183

184
export const Fonts = Platform.select({
185
  default: {
186
    sans: 'Inter',
187
    serif: 'serif',
188
    rounded: 'Inter',
189
    mono: 'monospace',
190
  },
191
});