| 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 GRAY = "#475569";
|
| 36 | const LIGHT_GRAY = "#64748B";
|
| 37 | const LIGHT_SLATE_GRAY = "#94A3B8";
|
| 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 | accentDarkPurple: "#7F77DD",
|
| 78 |
|
| 79 | // Some grays
|
| 80 | gray: GRAY,
|
| 81 | lightGray: LIGHT_GRAY,
|
| 82 | lightSlateGray: LIGHT_SLATE_GRAY,
|
| 83 | black: PRIMARY_DARK,
|
| 84 |
|
| 85 | // Disabled / Secondary
|
| 86 | disabled: "#cbd5e1",
|
| 87 | divider: BORDER_SUBTLE,
|
| 88 | sliderTracking: "#E2E8F0",
|
| 89 | sliderLabels: "#94a3b8",
|
| 90 | warning: "orange",
|
| 91 | success: "#22c55e",
|
| 92 | danger: "#EF4444",
|
| 93 | textBlack: PRIMARY_DARK,
|
| 94 | },
|
| 95 | };
|
| 96 |
|
| 97 | export const Typography = {
|
| 98 | // Headlines
|
| 99 | headlineXg: {
|
| 100 | fontFamily: Platform.select({
|
| 101 | android: "Inter_900Black",
|
| 102 | default: "Inter",
|
| 103 | }),
|
| 104 | fontSize: 36,
|
| 105 | fontWeight: "900" as const,
|
| 106 | lineHeight: 40,
|
| 107 | },
|
| 108 | headlineLg: {
|
| 109 | fontFamily: Platform.select({
|
| 110 | android: "Inter_900Black",
|
| 111 | default: "Inter",
|
| 112 | }),
|
| 113 | fontSize: 20,
|
| 114 | fontWeight: "900" as const,
|
| 115 | lineHeight: 28,
|
| 116 | letterSpacing: -0.02,
|
| 117 | },
|
| 118 | headlineMd: {
|
| 119 | fontFamily: Platform.select({
|
| 120 | android: "Inter",
|
| 121 | default: "Inter",
|
| 122 | }),
|
| 123 | fontSize: 18,
|
| 124 | fontWeight: "700" as const,
|
| 125 | lineHeight: 24,
|
| 126 | },
|
| 127 |
|
| 128 | // Body
|
| 129 | bodyLg: {
|
| 130 | fontFamily: Platform.select({
|
| 131 | android: "Inter",
|
| 132 | default: "Inter",
|
| 133 | }),
|
| 134 | fontSize: 16,
|
| 135 | fontWeight: "700" as const,
|
| 136 | lineHeight: 20,
|
| 137 | },
|
| 138 | bodyMd: {
|
| 139 | fontFamily: Platform.select({
|
| 140 | android: "Inter",
|
| 141 | default: "Inter",
|
| 142 | }),
|
| 143 | fontSize: 14,
|
| 144 | fontWeight: "500" as const,
|
| 145 | lineHeight: 20,
|
| 146 | },
|
| 147 |
|
| 148 | // Labels
|
| 149 | labelSm: {
|
| 150 | fontFamily: Platform.select({
|
| 151 | android: "Inter",
|
| 152 | default: "Inter",
|
| 153 | }),
|
| 154 | fontSize: 12,
|
| 155 | fontWeight: "600" as const,
|
| 156 | lineHeight: 16,
|
| 157 | letterSpacing: 0.05,
|
| 158 | },
|
| 159 |
|
| 160 | // Used for the Slider labels
|
| 161 | labelXs: {
|
| 162 | fontFamily: Platform.select({
|
| 163 | android: "Inter",
|
| 164 | default: "Inter",
|
| 165 | }),
|
| 166 | fontSize: 10,
|
| 167 | lineHeight: 15,
|
| 168 | letterSpacing: 0.25,
|
| 169 | },
|
| 170 |
|
| 171 | cardHint: {
|
| 172 | fontFamily: Platform.select({
|
| 173 | android: "Inter",
|
| 174 | default: "Inter",
|
| 175 | }),
|
| 176 | fontSize: 11,
|
| 177 | lineHeight: 13.8,
|
| 178 | fontStyle: "italic",
|
| 179 | },
|
| 180 | };
|
| 181 |
|
| 182 | export const Spacing = {
|
| 183 | containerPadding: 16, // 1rem
|
| 184 | sectionGap: 32, // 2rem
|
| 185 | inlineGapSm: 8, // 0.5rem
|
| 186 | cardGap: 12, // 0.75rem
|
| 187 | };
|
| 188 |
|
| 189 | export const BorderRadius = {
|
| 190 | sm: 4, // 0.25rem
|
| 191 | default: 8, // 0.5rem
|
| 192 | md: 12, // 0.75rem
|
| 193 | lg: 16, // 1rem
|
| 194 | xl: 24, // 1.5rem
|
| 195 | full: 9999, // pill-shaped
|
| 196 | };
|
| 197 |
|
| 198 | export const Shadows = {
|
| 199 | sm: {
|
| 200 | shadowColor: "#000000",
|
| 201 | shadowOffset: { width: 0, height: 1 },
|
| 202 | shadowOpacity: 0.05,
|
| 203 | shadowRadius: 2,
|
| 204 | elevation: 2,
|
| 205 | },
|
| 206 | md: {
|
| 207 | shadowColor: "#000000",
|
| 208 | shadowOffset: { width: 0, height: 4 },
|
| 209 | shadowOpacity: 0.1,
|
| 210 | shadowRadius: 8,
|
| 211 | elevation: 4,
|
| 212 | },
|
| 213 | lg: {
|
| 214 | shadowColor: NEON_GREEN,
|
| 215 | shadowOffset: { width: 0, height: 8 },
|
| 216 | shadowOpacity: 0.15,
|
| 217 | shadowRadius: 16,
|
| 218 | elevation: 8,
|
| 219 | },
|
| 220 | };
|
| 221 |
|
| 222 | export const Fonts = Platform.select({
|
| 223 | default: {
|
| 224 | sans: "Inter",
|
| 225 | serif: "serif",
|
| 226 | rounded: "Inter",
|
| 227 | mono: "monospace",
|
| 228 | },
|
| 229 | });
|
| 230 |
|
| 231 | export const Theme = {
|
| 232 | colors: Colors,
|
| 233 | typography: Typography,
|
| 234 | spacing: Spacing,
|
| 235 | shadows: Shadows,
|
| 236 | borderRadius: BorderRadius,
|
| 237 | };
|