| 1 | /** |
| 2 | * g1t's colours, as packages/theme/tokens.css names them, for React |
| 3 | * Native, which cannot read CSS variables. Keep the two in step: a colour |
| 4 | * changed there changes here. |
| 5 | * |
| 6 | * Dark is g1t's default, as on the site; light follows the phone's setting. |
| 7 | */ |
| 8 | |
| 9 | export type Palette = { |
| 10 | bg: string; |
| 11 | surface: string; |
| 12 | raised: string; |
| 13 | line: string; |
| 14 | lineStrong: string; |
| 15 | fg: string; |
| 16 | fgSoft: string; |
| 17 | muted: string; |
| 18 | faint: string; |
| 19 | accent: string; |
| 20 | accentDim: string; |
| 21 | accentLow: string; |
| 22 | /** Text on an accent-filled button. */ |
| 23 | onAccent: string; |
| 24 | success: string; |
| 25 | successLow: string; |
| 26 | info: string; |
| 27 | merged: string; |
| 28 | warn: string; |
| 29 | danger: string; |
| 30 | }; |
| 31 | |
| 32 | export const dark: Palette = { |
| 33 | bg: "#0f0f11", |
| 34 | surface: "#161618", |
| 35 | raised: "#1e1e21", |
| 36 | line: "#28282c", |
| 37 | lineStrong: "#38383e", |
| 38 | fg: "#ededef", |
| 39 | fgSoft: "#dcdce0", |
| 40 | muted: "#a0a0a8", |
| 41 | faint: "#86868e", |
| 42 | accent: "#b6a8ff", |
| 43 | accentDim: "#8577e0", |
| 44 | accentLow: "#221e38", |
| 45 | onAccent: "#0f0f11", |
| 46 | success: "#86efc4", |
| 47 | successLow: "#10302a", |
| 48 | info: "#8ab4ff", |
| 49 | merged: "#a678f5", |
| 50 | warn: "#ffbd8c", |
| 51 | danger: "#ff8394", |
| 52 | }; |
| 53 | |
| 54 | export const light: Palette = { |
| 55 | bg: "#fbfbfa", |
| 56 | surface: "#ffffff", |
| 57 | raised: "#f1f1ef", |
| 58 | line: "#e4e4e1", |
| 59 | lineStrong: "#d2d2ce", |
| 60 | fg: "#18181b", |
| 61 | fgSoft: "#2e2e33", |
| 62 | muted: "#5c5c66", |
| 63 | faint: "#686871", |
| 64 | accent: "#6b52c8", |
| 65 | accentDim: "#9584dc", |
| 66 | accentLow: "#ece8fb", |
| 67 | onAccent: "#ffffff", |
| 68 | success: "#0d7a52", |
| 69 | successLow: "#e2f4ec", |
| 70 | info: "#2160cc", |
| 71 | merged: "#7c3fd1", |
| 72 | warn: "#a84f00", |
| 73 | danger: "#c42a43", |
| 74 | }; |
| 75 | |
| 76 | export const space = { xs: 4, sm: 8, md: 12, lg: 16, xl: 24, xxl: 32 } as const; |
| 77 | |
| 78 | export const radius = { sm: 6, md: 10, lg: 14, full: 999 } as const; |
| 79 | |
| 80 | /** |
| 81 | * The site's faces (Hanken Grotesk, Bricolage Grotesque, IBM Plex Mono) |
| 82 | * ship as woff2, which phones cannot load; until TTF copies are bundled |
| 83 | * with expo-font, the system's faces stand in. |
| 84 | */ |
| 85 | export const fonts = { mono: "monospace" } as const; |