mobile bluesky app made with flutter
lazurite.stormlightlabs.org/
mobile
bluesky
flutter
1import type { ThemeColors, ThemeKey } from "./types";
2
3/** Splash screen sizes for Android */
4export const ANDROID_SIZES = [
5 { name: "mdpi", size: 320 },
6 { name: "hdpi", size: 480 },
7 { name: "xhdpi", size: 640 },
8 { name: "xxhdpi", size: 960 },
9 { name: "xxxhdpi", size: 1280 },
10];
11
12const IPHONE_X = { name: "Default-Portrait-812h@3x", size: 1125, scale: 3, height: 2436 };
13const IPHONE_XR = { name: "Default-Portrait-896h@3x", size: 828, scale: 3, height: 1792 };
14/** Also 13, 14 */
15const IPHONE_12 = { name: "Default-Portrait-926h@3x", size: 1170, scale: 3, height: 2532 };
16const IPHONE_14_PRO = { name: "Default-Portrait-932h@3x", size: 1179, scale: 3, height: 2556 };
17
18/** Splash screen sizes for iOS */
19export const IOS_SIZES: { name: string; size: number; scale: number; height?: number }[] = [
20 IPHONE_X,
21 IPHONE_XR,
22 IPHONE_12,
23 IPHONE_14_PRO,
24 { name: "Default", size: 320, scale: 1 },
25 { name: "Default@2x", size: 640, scale: 2 },
26 { name: "Default-568h@2x", size: 640, scale: 2, height: 1136 },
27 { name: "Default-667h@2x", size: 750, scale: 2, height: 1334 },
28 { name: "Default-Portrait-736h@3x", size: 1242, scale: 3, height: 2208 },
29 { name: "Default-Landscape-736h@3x", size: 2208, scale: 3, height: 1242 },
30 { name: "Default-Landscape-812h@3x", size: 2436, scale: 3, height: 1125 },
31 { name: "Default-Landscape-896h@3x", size: 1792, scale: 3, height: 828 },
32 { name: "Default-Landscape-926h@3x", size: 2532, scale: 3, height: 1170 },
33 { name: "Default-Landscape-932h@3x", size: 2556, scale: 3, height: 1179 },
34];
35
36export const THEMES: Record<ThemeKey, ThemeColors> = {
37 oxocarbon: { name: "Oxocarbon", variant: "dark", background: "#161616", text: "#f2f4f8", primary: "#78a9ff" },
38 "oxocarbon-light": {
39 name: "Oxocarbon Light",
40 variant: "light",
41 background: "#ffffff",
42 text: "#161616",
43 primary: "#0f62fe",
44 },
45 catppuccin: { name: "Catppuccin", variant: "dark", background: "#1e1e2e", text: "#cdd6f4", primary: "#b4befe" },
46 "catppuccin-light": {
47 name: "Catppuccin Light",
48 variant: "light",
49 background: "#eff1f5",
50 text: "#4c4f69",
51 primary: "#7287fd",
52 },
53 nord: { name: "Nord", variant: "dark", background: "#2e3440", text: "#e5e9f0", primary: "#88c0d0" },
54 "nord-light": { name: "Nord Light", variant: "light", background: "#eceff4", text: "#4c566a", primary: "#88c0d0" },
55 rosePine: { name: "Rosé Pine", variant: "dark", background: "#191724", text: "#e0def4", primary: "#ebbcba" },
56 "rosePine-light": {
57 name: "Rosé Pine Light",
58 variant: "light",
59 background: "#faf4ed",
60 text: "#575279",
61 primary: "#d7827e",
62 },
63};
64
65export function getThemeFromKey(k: ThemeKey | string): ThemeColors {
66 switch (k) {
67 case "oxocarbon":
68 return THEMES.oxocarbon;
69 case "oxocarbon-light":
70 return THEMES["oxocarbon-light"];
71 case "catppuccin":
72 return THEMES.catppuccin;
73 case "catppuccin-light":
74 return THEMES["catppuccin-light"];
75 case "nord":
76 return THEMES.nord;
77 case "nord-light":
78 return THEMES["nord-light"];
79 case "rosePine":
80 return THEMES.rosePine;
81 default:
82 return THEMES["rosePine-light"];
83 }
84}