Open History to see the last commit
1export const BUILT_IN_THEME_IDS = ["t3-chat", "grove", "ocean", "ember", "iris"] as const;
2
3/** The mobile app's own hand-tuned palette, which is not part of the built-in library. */
4export const MOBILE_DEFAULT_THEME_ID = "t3-code";
5
6/**
7 * Every palette the mobile app can render. Declared here so host-side tooling
8 * (the app-store screenshot harness) can validate a requested theme without
9 * importing React Native application code.
10 */
11export const MOBILE_THEME_IDS = [MOBILE_DEFAULT_THEME_ID, ...BUILT_IN_THEME_IDS] as const;
12
13export type BuiltInThemeId = (typeof BUILT_IN_THEME_IDS)[number];
14export type MobileThemeId = (typeof MOBILE_THEME_IDS)[number];
15export type ThemeAppearance = "light" | "dark";
16
17/** Product roles shared by web CSS, React Native tokens, and native surfaces. */
18export const THEME_COLOR_ROLES = [
19 "canvas",
20 "chrome",
21 "toolbar",
22 "toolbarForeground",
23 "toolbarBorder",
24 "toolbarControl",
25 "toolbarControlForeground",
26 "toolbarControlHover",
27 "surface",
28 "surfaceRaised",
29 "surfaceOverlay",
30 "text",
31 "textMuted",
32 "border",
33 "input",
34 "focus",
35 "accent",
36 "accentForeground",
37 "secondary",
38 "secondaryForeground",
39 "muted",
40 "mutedForeground",
41 "placeholder",
42 "secondaryLabel",
43 "iconMuted",
44 "error",
45 "errorForeground",
46 "errorSurface",
47 "warning",
48 "warningForeground",
49 "warningSurface",
50 "update",
51 "updateForeground",
52 "updateSurface",
53 "accentSurface",
54 "accentSurfaceForeground",
55 "messageSurface",
56 "messageForeground",
57 "messageAction",
58 "messageActionForeground",
59 "messageActionHover",
60 "codeBackground",
61 "codeForeground",
62 "sidebar",
63 "sidebarForeground",
64 "sidebarMutedForeground",
65 "sidebarControlSurface",
66 "sidebarRowHover",
67 "sidebarRowActive",
68 "sidebarRowSelected",
69 "sidebarBorder",
70 "terminalBackground",
71 "terminalForeground",
72 "terminalCursor",
73 "terminalSelection",
74 "terminalScrollbar",
75 "terminalScrollbarHover",
76] as const;
77
78export type ThemeColorRole = (typeof THEME_COLOR_ROLES)[number];
79export type ThemeColors = Readonly<Record<ThemeColorRole, string>>;
80export type ThemeVariants = Readonly<Partial<Record<ThemeAppearance, ThemeColors>>>;
81export type ThemeDefinition = Readonly<{
82 id: string;
83 label: string;
84 appearance: ThemeAppearance;
85 colors: ThemeColors;
86 variants?: ThemeVariants;
87 /** Groups related imported variants into one library card. */
88 collection?: Readonly<{ id: string; label: string }>;
89 /** Allows reviewed built-ins to render product artwork over their sidebar. */
90 sidebarArtwork?: boolean;
91 /** Generated from the guided editor's canvas and accent roles. */
92 managed?: boolean;
93}>;
94
95export const T3_CHAT_THEME: ThemeDefinition = {
96 id: "t3-chat",
97 label: "T3 Chat",
98 appearance: "light",
99 colors: {
100 canvas: "oklch(0.982446 0.010114 325.653)",
101 chrome: "oklch(0.982446 0.010114 325.653)",
102 toolbar: "oklch(0.982446 0.010114 325.653)",
103 toolbarForeground: "oklch(0.325698 0.116116 325.037)",
104 toolbarBorder: "oklch(0.856784 0.082879 328.911)",
105 toolbarControl: "oklch(0.939552 0.024286 321.664)",
106 toolbarControlForeground: "oklch(0.325698 0.116116 325.037)",
107 toolbarControlHover: "oklch(0.884525 0.041658 337.177)",
108 surface: "oklch(0.971835 0.012884 321.894)",
109 surfaceRaised: "oklch(0.988235 0.005049 325.615)",
110 surfaceOverlay: "oklch(1 0 0)",
111 text: "oklch(0.325698 0.116116 325.037)",
112 textMuted: "oklch(0.494754 0.190937 354.544)",
113 border: "oklch(0.923531 0.021247 328.096)",
114 input: "oklch(0.851713 0.055822 336.6)",
115 focus: "oklch(0.591646 0.217985 0.584)",
116 accent: "oklch(0.591646 0.217985 0.584)",
117 accentForeground: "oklch(1 0 0)",
118 secondary: "oklch(0.869588 0.06751 334.899)",
119 secondaryForeground: "oklch(0.444777 0.134061 324.799)",
120 muted: "oklch(0.802407 0.090963 345.892)",
121 mutedForeground: "oklch(0.428932 0.163929 354.332)",
122 placeholder: "oklch(0.549927 0.090215 323.149)",
123 secondaryLabel: "oklch(0.494754 0.190937 354.544)",
124 iconMuted: "oklch(0.494754 0.190937 354.544)",
125 error: "oklch(0.627117 0.248974 7.734)",
126 errorForeground: "oklch(0.458704 0.169677 3.815)",
127 errorSurface: "oklch(0.942787 0.032076 344.963)",
128 warning: "oklch(0.76859 0.164659 70.08)",
129 warningForeground: "oklch(0.54612 0.143036 48.949)",
130 warningSurface: "oklch(0.962901 0.015297 48.56)",
131 update: "oklch(0.591646 0.217985 0.584)",
132 updateForeground: "oklch(0.494754 0.190937 354.544)",
133 updateSurface: "oklch(0.930264 0.036194 341.45)",
134 accentSurface: "oklch(0.939552 0.024286 321.664)",
135 accentSurfaceForeground: "oklch(0.396296 0.025134 285.196)",
136 messageSurface: "oklch(0.926746 0.037898 332.6)",
137 messageForeground: "oklch(0.354591 0.093575 307.568)",
138 messageAction: "oklch(0.591646 0.217985 0.584)",
139 messageActionForeground: "oklch(1 0 0)",
140 messageActionHover: "oklch(0.539042 0.197866 0.305)",
141 codeBackground: "oklch(0.953855 0.019695 315.668)",
142 codeForeground: "oklch(0.445128 0.13005 307.026)",
143 sidebar: "oklch(0.928886 0.031178 322.592)",
144 sidebarForeground: "oklch(0.396296 0.025134 285.196)",
145 sidebarMutedForeground: "oklch(0.494754 0.190937 354.544)",
146 sidebarControlSurface: "oklch(0.978851 0.001321 106.424)",
147 sidebarRowHover: "oklch(0.978851 0.001321 106.424)",
148 sidebarRowActive: "oklch(0.978851 0.001321 106.424)",
149 sidebarRowSelected: "oklch(0.978851 0.001321 106.424)",
150 sidebarBorder: "oklch(0.938313 0.002552 48.717)",
151 terminalBackground: "oklch(0.982446 0.010114 325.653)",
152 terminalForeground: "oklch(0.325698 0.116116 325.037)",
153 terminalCursor: "oklch(0.591646 0.217985 0.584)",
154 terminalSelection: "oklch(0.869588 0.06751 334.899)",
155 terminalScrollbar: "oklch(0.851713 0.055822 336.6)",
156 terminalScrollbarHover: "oklch(0.802407 0.090963 345.892)",
157 },
158 variants: {
159 dark: {
160 canvas: "oklch(0.22813 0.020366 307.469)",
161 chrome: "oklch(0.22813 0.020366 307.469)",
162 toolbar: "oklch(0.22813 0.020366 307.469)",
163 toolbarForeground: "oklch(0.980735 0.004092 301.426)",
164 toolbarBorder: "oklch(0.266943 0.015262 302.425)",
165 toolbarControl: "oklch(0.313674 0.030572 310.061)",
166 toolbarControlForeground: "oklch(0.848252 0.038248 307.961)",
167 toolbarControlHover: "oklch(0.364912 0.050794 308.491)",
168 surface: "oklch(0.267101 0.02016 311.799)",
169 surfaceRaised: "oklch(0.279864 0.021572 309.532)",
170 surfaceOverlay: "oklch(0.154761 0.01316 338.901)",
171 text: "oklch(0.980735 0.004092 301.426)",
172 textMuted: "oklch(0.880303 0.03077 342.696)",
173 border: "oklch(0.266943 0.015262 302.425)",
174 input: "oklch(0.266817 0.02897 344.461)",
175 focus: "oklch(0.591646 0.217985 0.584)",
176 accent: "oklch(0.460685 0.185347 4.099)",
177 accentForeground: "oklch(0.901233 0.057189 343.694)",
178 secondary: "oklch(0.313674 0.030572 310.061)",
179 secondaryForeground: "oklch(0.848252 0.038248 307.961)",
180 muted: "oklch(0.360924 0.021469 316.83)",
181 mutedForeground: "oklch(0.880303 0.03077 342.696)",
182 placeholder: "oklch(0.657087 0.028226 307.985)",
183 secondaryLabel: "oklch(0.880303 0.03077 342.696)",
184 iconMuted: "oklch(0.848252 0.038248 307.961)",
185 error: "oklch(0.458704 0.169677 3.815)",
186 errorForeground: "oklch(0.901233 0.057189 343.694)",
187 errorSurface: "oklch(0.259022 0.04799 340.062)",
188 warning: "oklch(0.76859 0.164659 70.08)",
189 warningForeground: "oklch(0.836861 0.164422 84.429)",
190 warningSurface: "oklch(0.321706 0.036256 60.806)",
191 update: "oklch(0.460685 0.185347 4.099)",
192 updateForeground: "oklch(0.901233 0.057189 343.694)",
193 updateSurface: "oklch(0.256077 0.063004 342.914)",
194 accentSurface: "oklch(0.364912 0.050794 308.491)",
195 accentSurfaceForeground: "oklch(0.964695 0.009139 341.803)",
196 messageSurface: "oklch(0.273791 0.025541 309.079)",
197 messageForeground: "oklch(0.949872 0.021269 306.838)",
198 messageAction: "oklch(0.460685 0.185347 4.099)",
199 messageActionForeground: "oklch(0.901233 0.057189 343.694)",
200 messageActionHover: "oklch(0.458754 0.184639 3.857)",
201 codeBackground: "oklch(0.22813 0.020366 307.469)",
202 codeForeground: "oklch(0.848703 0.064239 306.645)",
203 sidebar: "oklch(0.185778 0.019368 322.159)",
204 sidebarForeground: "oklch(0.967434 0.001326 286.375)",
205 sidebarMutedForeground: "oklch(0.880303 0.03077 342.696)",
206 sidebarControlSurface: "oklch(0.23366 0.026081 338.196)",
207 sidebarRowHover: "oklch(0.23366 0.026081 338.196)",
208 sidebarRowActive: "oklch(0.23366 0.026081 338.196)",
209 sidebarRowSelected: "oklch(0.23366 0.026081 338.196)",
210 sidebarBorder: "oklch(0.269132 0.030766 351.067)",
211 terminalBackground: "oklch(0.22813 0.020366 307.469)",
212 terminalForeground: "oklch(0.980735 0.004092 301.426)",
213 terminalCursor: "oklch(0.591646 0.217985 0.584)",
214 terminalSelection: "oklch(0.313674 0.030572 310.061)",
215 terminalScrollbar: "oklch(0.266817 0.02897 344.461)",
216 terminalScrollbarHover: "oklch(0.360924 0.021469 316.83)",
217 },
218 },
219 sidebarArtwork: true,
220};
221
222export const GROVE_THEME: ThemeDefinition = {
223 id: "grove",
224 label: "Grove",
225 appearance: "light",
226 colors: {
227 canvas: "oklch(0.972369 0.005497 157.15)",
228 chrome: "oklch(0.972369 0.005497 157.15)",
229 toolbar: "oklch(0.972369 0.005497 157.15)",
230 toolbarForeground: "oklch(0.222003 0.03479 328.979)",
231 toolbarBorder: "oklch(0.909438 0.021521 164.612)",
232 toolbarControl: "oklch(0.936464 0.014601 163.554)",
233 toolbarControlForeground: "oklch(0.222003 0.03479 328.979)",
234 toolbarControlHover: "oklch(0.909438 0.021521 164.612)",
235 surface: "oklch(0.972369 0.005497 157.15)",
236 surfaceRaised: "oklch(0.949276 0.004496 159.002)",
237 surfaceOverlay: "oklch(0.932695 0.003778 160.944)",
238 text: "oklch(0.222003 0.03479 328.979)",
239 textMuted: "oklch(0.540472 0.014944 326.176)",
240 border: "oklch(0.864831 0.01312 167.255)",
241 input: "oklch(0.829746 0.016084 168.234)",
242 focus: "oklch(0.523295 0.112292 158.089)",
243 accent: "oklch(0.523295 0.112292 158.089)",
244 accentForeground: "oklch(0.990339 0.008411 325.64)",
245 secondary: "oklch(0.936464 0.014601 163.554)",
246 secondaryForeground: "oklch(0.222003 0.03479 328.979)",
247 muted: "oklch(0.945455 0.012308 162.879)",
248 mutedForeground: "oklch(0.527266 0.012309 320.683)",
249 placeholder: "oklch(0.529681 0.01551 326.299)",
250 secondaryLabel: "oklch(0.540472 0.014944 326.176)",
251 iconMuted: "oklch(0.540472 0.014944 326.176)",
252 error: "oklch(0.637823 0.237287 25.436)",
253 errorForeground: "oklch(0.509494 0.208583 28.513)",
254 errorSurface: "oklch(0.936968 0.014243 26.295)",
255 warning: "oklch(0.772406 0.172798 65.367)",
256 warningForeground: "oklch(0.545036 0.155019 45.359)",
257 warningSurface: "oklch(0.953175 0.02009 93.379)",
258 update: "oklch(0.523295 0.112292 158.089)",
259 updateForeground: "oklch(0.388012 0.080082 158.768)",
260 updateSurface: "oklch(0.900411 0.02384 164.795)",
261 accentSurface: "oklch(0.909438 0.021521 164.612)",
262 accentSurfaceForeground: "oklch(0.222003 0.03479 328.979)",
263 messageSurface: "oklch(0.891377 0.026164 164.929)",
264 messageForeground: "oklch(0.222003 0.03479 328.979)",
265 messageAction: "oklch(0.535028 0.106403 77.549)",
266 messageActionForeground: "oklch(0.990339 0.008411 325.64)",
267 messageActionHover: "oklch(0.488753 0.096536 77.829)",
268 codeBackground: "oklch(0.955888 0.004783 158.391)",
269 codeForeground: "oklch(0.222003 0.03479 328.979)",
270 sidebar: "oklch(0.936464 0.014601 163.554)",
271 sidebarForeground: "oklch(0.222003 0.03479 328.979)",
272 sidebarMutedForeground: "oklch(0.515606 0.011938 318.897)",
273 sidebarControlSurface: "oklch(0.88585 0.011734 166.331)",
274 sidebarRowHover: "oklch(0.886676 0.027374 164.983)",
275 sidebarRowActive: "oklch(0.85335 0.03597 165.158)",
276 sidebarRowSelected: "oklch(0.836654 0.040284 165.149)",
277 sidebarBorder: "oklch(0.860274 0.010287 168.339)",
278 terminalBackground: "oklch(0.972369 0.005497 157.15)",
279 terminalForeground: "oklch(0.222003 0.03479 328.979)",
280 terminalCursor: "oklch(0.523295 0.112292 158.089)",
281 terminalSelection: "oklch(0.891377 0.026164 164.929)",
282 terminalScrollbar: "oklch(0.824752 0.001392 294.641)",
283 terminalScrollbarHover: "oklch(0.755495 0.004415 318.776)",
284 },
285 variants: {
286 dark: {
287 canvas: "oklch(0.260865 0.02152 162.75)",
288 chrome: "oklch(0.260865 0.02152 162.75)",
289 toolbar: "oklch(0.260865 0.02152 162.75)",
290 toolbarForeground: "oklch(0.990339 0.008411 325.64)",
291 toolbarBorder: "oklch(0.464636 0.066083 158.72)",
292 toolbarControl: "oklch(0.380487 0.048313 159.608)",
293 toolbarControlForeground: "oklch(0.990339 0.008411 325.64)",
294 toolbarControlHover: "oklch(0.437021 0.060312 158.962)",
295 surface: "oklch(0.260865 0.02152 162.75)",
296 surfaceRaised: "oklch(0.363192 0.016572 165.32)",
297 surfaceOverlay: "oklch(0.411828 0.014378 166.627)",
298 text: "oklch(0.990339 0.008411 325.64)",
299 textMuted: "oklch(0.666747 0.004239 187.292)",
300 border: "oklch(0.457475 0.044046 160.971)",
301 input: "oklch(0.519849 0.049896 160.863)",
302 focus: "oklch(0.796228 0.133058 157.319)",
303 accent: "oklch(0.796228 0.133058 157.319)",
304 accentForeground: "oklch(0.222003 0.03479 328.979)",
305 secondary: "oklch(0.380487 0.048313 159.608)",
306 secondaryForeground: "oklch(0.990339 0.008411 325.64)",
307 muted: "oklch(0.339728 0.039456 160.274)",
308 mutedForeground: "oklch(0.715427 0.010896 171.428)",
309 placeholder: "oklch(0.739243 0.002222 223.225)",
310 secondaryLabel: "oklch(0.666747 0.004239 187.292)",
311 iconMuted: "oklch(0.666747 0.004239 187.292)",
312 error: "oklch(0.655108 0.221148 23.473)",
313 errorForeground: "oklch(0.704237 0.187511 22.228)",
314 errorSurface: "oklch(0.312773 0.02923 32.121)",
315 warning: "oklch(0.772406 0.172798 65.367)",
316 warningForeground: "oklch(0.829017 0.171221 81.038)",
317 warningSurface: "oklch(0.345524 0.046882 99.736)",
318 update: "oklch(0.796228 0.133058 157.319)",
319 updateForeground: "oklch(0.86276 0.089288 159.704)",
320 updateSurface: "oklch(0.448116 0.062637 158.86)",
321 accentSurface: "oklch(0.437021 0.060312 158.962)",
322 accentSurfaceForeground: "oklch(0.990339 0.008411 325.64)",
323 messageSurface: "oklch(0.470111 0.067221 158.676)",
324 messageForeground: "oklch(0.990339 0.008411 325.64)",
325 messageAction: "oklch(0.791603 0.129713 83.299)",
326 messageActionForeground: "oklch(0.222003 0.03479 328.979)",
327 messageActionHover: "oklch(0.815227 0.117902 84.21)",
328 codeBackground: "oklch(0.312979 0.018942 164.082)",
329 codeForeground: "oklch(0.990339 0.008411 325.64)",
330 sidebar: "oklch(0.309925 0.032827 160.944)",
331 sidebarForeground: "oklch(0.990339 0.008411 325.64)",
332 sidebarMutedForeground: "oklch(0.711387 0.007643 175.89)",
333 sidebarControlSurface: "oklch(0.432727 0.024549 163.654)",
334 sidebarRowHover: "oklch(0.374959 0.047124 159.686)",
335 sidebarRowActive: "oklch(0.41688 0.056069 159.165)",
336 sidebarRowSelected: "oklch(0.437466 0.060406 158.958)",
337 sidebarBorder: "oklch(0.569253 0.015933 167.062)",
338 terminalBackground: "oklch(0.260865 0.02152 162.75)",
339 terminalForeground: "oklch(0.990339 0.008411 325.64)",
340 terminalCursor: "oklch(0.796228 0.133058 157.319)",
341 terminalSelection: "oklch(0.464636 0.066083 158.72)",
342 terminalScrollbar: "oklch(0.594692 0.006862 176.022)",
343 terminalScrollbarHover: "oklch(0.687968 0.00354 193.55)",
344 },
345 },
346 sidebarArtwork: true,
347};
348
349export const OCEAN_THEME: ThemeDefinition = {
350 id: "ocean",
351 label: "Ocean",
352 appearance: "light",
353 colors: {
354 canvas: "oklch(0.974199 0.002856 241.597)",
355 chrome: "oklch(0.974199 0.002856 241.597)",
356 toolbar: "oklch(0.974199 0.002856 241.597)",
357 toolbarForeground: "oklch(0.222003 0.03479 328.979)",
358 toolbarBorder: "oklch(0.91295 0.018827 241.836)",
359 toolbarControl: "oklch(0.939254 0.01193 241.729)",
360 toolbarControlForeground: "oklch(0.222003 0.03479 328.979)",
361 toolbarControlHover: "oklch(0.91295 0.018827 241.836)",
362 surface: "oklch(0.974199 0.002856 241.597)",
363 surfaceRaised: "oklch(0.951058 0.002962 258.339)",
364 surfaceOverlay: "oklch(0.934442 0.003181 269.1)",
365 text: "oklch(0.222003 0.03479 328.979)",
366 textMuted: "oklch(0.541555 0.017468 323.531)",
367 border: "oklch(0.867646 0.013482 252.362)",
368 input: "oklch(0.832939 0.017389 252.598)",
369 focus: "oklch(0.536684 0.120219 247.01)",
370 accent: "oklch(0.536684 0.120219 247.01)",
371 accentForeground: "oklch(0.990339 0.008411 325.64)",
372 secondary: "oklch(0.939254 0.01193 241.729)",
373 secondaryForeground: "oklch(0.222003 0.03479 328.979)",
374 muted: "oklch(0.948004 0.009649 241.695)",
375 mutedForeground: "oklch(0.528741 0.01828 313.823)",
376 placeholder: "oklch(0.530733 0.01795 323.79)",
377 secondaryLabel: "oklch(0.541555 0.017468 323.531)",
378 iconMuted: "oklch(0.541555 0.017468 323.531)",
379 error: "oklch(0.637823 0.237287 25.436)",
380 errorForeground: "oklch(0.509494 0.208583 28.513)",
381 errorSurface: "oklch(0.938747 0.016377 7.186)",
382 warning: "oklch(0.772406 0.172798 65.367)",
383 warningForeground: "oklch(0.546927 0.155556 45.359)",
384 warningSurface: "oklch(0.954846 0.016009 81.731)",
385 update: "oklch(0.536684 0.120219 247.01)",
386 updateForeground: "oklch(0.397497 0.084999 246.523)",
387 updateSurface: "oklch(0.904165 0.021144 241.874)",
388 accentSurface: "oklch(0.91295 0.018827 241.836)",
389 accentSurfaceForeground: "oklch(0.222003 0.03479 328.979)",
390 messageSurface: "oklch(0.895373 0.023469 241.913)",
391 messageForeground: "oklch(0.222003 0.03479 328.979)",
392 messageAction: "oklch(0.493961 0.08175 201.584)",
393 messageActionForeground: "oklch(0.990339 0.008411 325.64)",
394 messageActionHover: "oklch(0.45151 0.074407 201.516)",
395 codeBackground: "oklch(0.957684 0.002906 253.68)",
396 codeForeground: "oklch(0.222003 0.03479 328.979)",
397 sidebar: "oklch(0.939254 0.01193 241.729)",
398 sidebarForeground: "oklch(0.222003 0.03479 328.979)",
399 sidebarMutedForeground: "oklch(0.517366 0.018944 311.433)",
400 sidebarControlSurface: "oklch(0.888479 0.011475 251.638)",
401 sidebarRowHover: "oklch(0.890798 0.024681 241.933)",
402 sidebarRowActive: "oklch(0.858363 0.033325 242.089)",
403 sidebarRowSelected: "oklch(0.842113 0.037689 242.174)",
404 sidebarBorder: "oklch(0.862823 0.011384 256.926)",
405 terminalBackground: "oklch(0.974199 0.002856 241.597)",
406 terminalForeground: "oklch(0.222003 0.03479 328.979)",
407 terminalCursor: "oklch(0.536684 0.120219 247.01)",
408 terminalSelection: "oklch(0.895373 0.023469 241.913)",
409 terminalScrollbar: "oklch(0.826271 0.006191 305.456)",
410 terminalScrollbarHover: "oklch(0.756866 0.008685 313.721)",
411 },
412 variants: {
413 dark: {
414 canvas: "oklch(0.242641 0.024125 250.573)",
415 chrome: "oklch(0.242641 0.024125 250.573)",
416 toolbar: "oklch(0.242641 0.024125 250.573)",
417 toolbarForeground: "oklch(0.990339 0.008411 325.64)",
418 toolbarBorder: "oklch(0.439946 0.0561 243.479)",
419 toolbarControl: "oklch(0.358725 0.043145 244.911)",
420 toolbarControlForeground: "oklch(0.990339 0.008411 325.64)",
421 toolbarControlHover: "oklch(0.413315 0.051874 243.855)",
422 surface: "oklch(0.242641 0.024125 250.573)",
423 surfaceRaised: "oklch(0.348439 0.019942 253.696)",
424 surfaceOverlay: "oklch(0.398517 0.018232 255.72)",
425 text: "oklch(0.990339 0.008411 325.64)",
426 textMuted: "oklch(0.652227 0.01149 273.31)",
427 border: "oklch(0.438653 0.039496 245.44)",
428 input: "oklch(0.500905 0.043574 244.781)",
429 focus: "oklch(0.758933 0.105833 241.548)",
430 accent: "oklch(0.758933 0.105833 241.548)",
431 accentForeground: "oklch(0.222003 0.03479 328.979)",
432 secondary: "oklch(0.358725 0.043145 244.911)",
433 secondaryForeground: "oklch(0.990339 0.008411 325.64)",
434 muted: "oklch(0.319287 0.036766 246.065)",
435 mutedForeground: "oklch(0.691936 0.016294 261.588)",
436 placeholder: "oklch(0.721641 0.010192 281.271)",
437 secondaryLabel: "oklch(0.652227 0.01149 273.31)",
438 iconMuted: "oklch(0.652227 0.01149 273.31)",
439 error: "oklch(0.655108 0.221148 23.473)",
440 errorForeground: "oklch(0.702184 0.189226 22.228)",
441 errorSurface: "oklch(0.298933 0.036443 350.094)",
442 warning: "oklch(0.772406 0.172798 65.367)",
443 warningForeground: "oklch(0.829017 0.171221 81.038)",
444 warningSurface: "oklch(0.329449 0.028712 84.495)",
445 update: "oklch(0.758933 0.105833 241.548)",
446 updateForeground: "oklch(0.840844 0.069217 240.151)",
447 updateSurface: "oklch(0.424017 0.053575 243.695)",
448 accentSurface: "oklch(0.413315 0.051874 243.855)",
449 accentSurfaceForeground: "oklch(0.990339 0.008411 325.64)",
450 messageSurface: "oklch(0.445224 0.056936 243.413)",
451 messageForeground: "oklch(0.990339 0.008411 325.64)",
452 messageAction: "oklch(0.793363 0.105022 199.893)",
453 messageActionForeground: "oklch(0.222003 0.03479 328.979)",
454 messageActionHover: "oklch(0.815308 0.096174 199.862)",
455 codeBackground: "oklch(0.29661 0.021883 251.968)",
456 codeForeground: "oklch(0.990339 0.008411 325.64)",
457 sidebar: "oklch(0.290387 0.032043 247.274)",
458 sidebarForeground: "oklch(0.990339 0.008411 325.64)",
459 sidebarMutedForeground: "oklch(0.69099 0.01395 266.424)",
460 sidebarControlSurface: "oklch(0.417822 0.02535 250.162)",
461 sidebarRowHover: "oklch(0.353381 0.042285 245.043)",
462 sidebarRowActive: "oklch(0.393878 0.048778 244.179)",
463 sidebarRowSelected: "oklch(0.413744 0.051943 243.848)",
464 sidebarBorder: "oklch(0.55859 0.019001 256.223)",
465 terminalBackground: "oklch(0.242641 0.024125 250.573)",
466 terminalForeground: "oklch(0.990339 0.008411 325.64)",
467 terminalCursor: "oklch(0.758933 0.105833 241.548)",
468 terminalSelection: "oklch(0.439946 0.0561 243.479)",
469 terminalScrollbar: "oklch(0.58613 0.012959 267.22)",
470 terminalScrollbarHover: "oklch(0.681569 0.010909 276.465)",
471 },
472 },
473 sidebarArtwork: true,
474};
475
476export const EMBER_THEME: ThemeDefinition = {
477 id: "ember",
478 label: "Ember",
479 appearance: "light",
480 colors: {
481 canvas: "oklch(0.976527 0.002685 60.725)",
482 chrome: "oklch(0.976527 0.002685 60.725)",
483 toolbar: "oklch(0.976527 0.002685 60.725)",
484 toolbarForeground: "oklch(0.222003 0.03479 328.979)",
485 toolbarBorder: "oklch(0.916502 0.01832 49.597)",
486 toolbarControl: "oklch(0.942267 0.01151 50.785)",
487 toolbarControlForeground: "oklch(0.222003 0.03479 328.979)",
488 toolbarControlHover: "oklch(0.916502 0.01832 49.597)",
489 surface: "oklch(0.976527 0.002685 60.725)",
490 surfaceRaised: "oklch(0.953321 0.002701 42.266)",
491 surfaceOverlay: "oklch(0.936659 0.002879 29.96)",
492 text: "oklch(0.222003 0.03479 328.979)",
493 textMuted: "oklch(0.543023 0.017316 331.964)",
494 border: "oklch(0.870631 0.013204 39.431)",
495 input: "oklch(0.836213 0.017153 38.661)",
496 focus: "oklch(0.552831 0.129438 44.656)",
497 accent: "oklch(0.552831 0.129438 44.656)",
498 accentForeground: "oklch(0.990339 0.008411 325.64)",
499 secondary: "oklch(0.942267 0.01151 50.785)",
500 secondaryForeground: "oklch(0.222003 0.03479 328.979)",
501 muted: "oklch(0.950842 0.009273 51.528)",
502 mutedForeground: "oklch(0.530413 0.018453 341.181)",
503 placeholder: "oklch(0.532339 0.017796 331.748)",
504 secondaryLabel: "oklch(0.543023 0.017316 331.964)",
505 iconMuted: "oklch(0.543023 0.017316 331.964)",
506 error: "oklch(0.637823 0.237287 25.436)",
507 errorForeground: "oklch(0.509494 0.208583 28.513)",
508 errorSurface: "oklch(0.941094 0.019938 19.375)",
509 warning: "oklch(0.772406 0.172798 65.367)",
510 warningForeground: "oklch(0.549154 0.156188 45.359)",
511 warningSurface: "oklch(0.957148 0.020843 76.702)",
512 update: "oklch(0.552831 0.129438 44.656)",
513 updateForeground: "oklch(0.408647 0.091207 45.037)",
514 updateSurface: "oklch(0.907902 0.020621 49.36)",
515 accentSurface: "oklch(0.916502 0.01832 49.597)",
516 accentSurfaceForeground: "oklch(0.222003 0.03479 328.979)",
517 messageSurface: "oklch(0.899296 0.022939 49.163)",
518 messageForeground: "oklch(0.222003 0.03479 328.979)",
519 messageAction: "oklch(0.516323 0.161628 24.82)",
520 messageActionForeground: "oklch(0.990339 0.008411 325.64)",
521 messageActionHover: "oklch(0.471223 0.145843 24.688)",
522 codeBackground: "oklch(0.959965 0.002668 47.512)",
523 codeForeground: "oklch(0.222003 0.03479 328.979)",
524 sidebar: "oklch(0.942267 0.01151 50.785)",
525 sidebarForeground: "oklch(0.222003 0.03479 328.979)",
526 sidebarMutedForeground: "oklch(0.519146 0.019214 343.427)",
527 sidebarControlSurface: "oklch(0.891332 0.011179 40.596)",
528 sidebarRowHover: "oklch(0.894819 0.024151 49.073)",
529 sidebarRowActive: "oklch(0.863104 0.032855 48.586)",
530 sidebarRowSelected: "oklch(0.84723 0.037292 48.403)",
531 sidebarBorder: "oklch(0.865593 0.011154 35.246)",
532 terminalBackground: "oklch(0.976527 0.002685 60.725)",
533 terminalForeground: "oklch(0.222003 0.03479 328.979)",
534 terminalCursor: "oklch(0.552831 0.129438 44.656)",
535 terminalSelection: "oklch(0.899296 0.022939 49.163)",
536 terminalScrollbar: "oklch(0.828185 0.005884 349.533)",
537 terminalScrollbarHover: "oklch(0.758584 0.008423 341.16)",
538 },
539 variants: {
540 dark: {
541 canvas: "oklch(0.245899 0.019144 42.044)",
542 chrome: "oklch(0.245899 0.019144 42.044)",
543 toolbar: "oklch(0.245899 0.019144 42.044)",
544 toolbarForeground: "oklch(0.990339 0.008411 325.64)",
545 toolbarBorder: "oklch(0.442681 0.0608 50.795)",
546 toolbarControl: "oklch(0.361499 0.044052 49.515)",
547 toolbarControlForeground: "oklch(0.990339 0.008411 325.64)",
548 toolbarControlHover: "oklch(0.416048 0.055354 50.484)",
549 surface: "oklch(0.245899 0.019144 42.044)",
550 surfaceRaised: "oklch(0.351262 0.01565 37.592)",
551 surfaceOverlay: "oklch(0.401111 0.014308 34.896)",
552 text: "oklch(0.990339 0.008411 325.64)",
553 textMuted: "oklch(0.654017 0.009505 13.287)",
554 border: "oklch(0.44099 0.040202 48.807)",
555 input: "oklch(0.503003 0.045721 49.44)",
556 focus: "oklch(0.762174 0.124117 52.082)",
557 accent: "oklch(0.762174 0.124117 52.082)",
558 accentForeground: "oklch(0.222003 0.03479 328.979)",
559 secondary: "oklch(0.361499 0.044052 49.515)",
560 secondaryForeground: "oklch(0.990339 0.008411 325.64)",
561 muted: "oklch(0.322144 0.03574 48.309)",
562 mutedForeground: "oklch(0.692479 0.015227 30.963)",
563 placeholder: "oklch(0.723533 0.008741 4.515)",
564 secondaryLabel: "oklch(0.654017 0.009505 13.287)",
565 iconMuted: "oklch(0.654017 0.009505 13.287)",
566 error: "oklch(0.655108 0.221148 23.473)",
567 errorForeground: "oklch(0.702184 0.189226 22.228)",
568 errorSurface: "oklch(0.310955 0.059624 24.334)",
569 warning: "oklch(0.772406 0.172798 65.367)",
570 warningForeground: "oklch(0.829017 0.171221 81.038)",
571 warningSurface: "oklch(0.339137 0.055638 66.911)",
572 update: "oklch(0.762174 0.124117 52.082)",
573 updateForeground: "oklch(0.841456 0.079585 53.521)",
574 updateSurface: "oklch(0.426749 0.057547 50.618)",
575 accentSurface: "oklch(0.416048 0.055354 50.484)",
576 accentSurfaceForeground: "oklch(0.990339 0.008411 325.64)",
577 messageSurface: "oklch(0.447961 0.061874 50.849)",
578 messageForeground: "oklch(0.990339 0.008411 325.64)",
579 messageAction: "oklch(0.747955 0.135578 29.432)",
580 messageActionForeground: "oklch(0.222003 0.03479 328.979)",
581 messageActionHover: "oklch(0.775116 0.117953 29.014)",
582 codeBackground: "oklch(0.299662 0.017229 39.973)",
583 codeForeground: "oklch(0.990339 0.008411 325.64)",
584 sidebar: "oklch(0.293349 0.029554 46.882)",
585 sidebarForeground: "oklch(0.990339 0.008411 325.64)",
586 sidebarMutedForeground: "oklch(0.691874 0.012538 24.638)",
587 sidebarControlSurface: "oklch(0.420227 0.022893 43.226)",
588 sidebarRowHover: "oklch(0.356163 0.042933 49.385)",
589 sidebarRowActive: "oklch(0.396617 0.051353 50.201)",
590 sidebarRowSelected: "oklch(0.416477 0.055442 50.489)",
591 sidebarBorder: "oklch(0.560372 0.016998 36.179)",
592 terminalBackground: "oklch(0.245899 0.019144 42.044)",
593 terminalForeground: "oklch(0.990339 0.008411 325.64)",
594 terminalCursor: "oklch(0.762174 0.124117 52.082)",
595 terminalSelection: "oklch(0.442681 0.0608 50.795)",
596 terminalScrollbar: "oklch(0.587861 0.010463 20.444)",
597 terminalScrollbarHover: "oklch(0.682876 0.009156 9.796)",
598 },
599 },
600 sidebarArtwork: true,
601};
602
603export const IRIS_THEME: ThemeDefinition = {
604 id: "iris",
605 label: "Iris",
606 appearance: "light",
607 colors: {
608 canvas: "oklch(0.976531 0.003855 303.226)",
609 chrome: "oklch(0.976531 0.003855 303.226)",
610 toolbar: "oklch(0.976531 0.003855 303.226)",
611 toolbarForeground: "oklch(0.222003 0.03479 328.979)",
612 toolbarBorder: "oklch(0.914882 0.022965 299.986)",
613 toolbarControl: "oklch(0.941387 0.014687 300.474)",
614 toolbarControlForeground: "oklch(0.222003 0.03479 328.979)",
615 toolbarControlHover: "oklch(0.914882 0.022965 299.986)",
616 surface: "oklch(0.976531 0.003855 303.226)",
617 surfaceRaised: "oklch(0.953326 0.004536 307.676)",
618 surfaceOverlay: "oklch(0.936665 0.005041 310.132)",
619 text: "oklch(0.222003 0.03479 328.979)",
620 textMuted: "oklch(0.543042 0.018894 325.652)",
621 border: "oklch(0.869608 0.018226 303.859)",
622 input: "oklch(0.834773 0.023405 303.676)",
623 focus: "oklch(0.525348 0.15373 294.176)",
624 accent: "oklch(0.525348 0.15373 294.176)",
625 accentForeground: "oklch(0.990339 0.008411 325.64)",
626 secondary: "oklch(0.941387 0.014687 300.474)",
627 secondaryForeground: "oklch(0.222003 0.03479 328.979)",
628 muted: "oklch(0.950194 0.011956 300.733)",
629 mutedForeground: "oklch(0.529955 0.022319 321.556)",
630 placeholder: "oklch(0.532177 0.019333 325.784)",
631 secondaryLabel: "oklch(0.543042 0.018894 325.652)",
632 iconMuted: "oklch(0.543042 0.018894 325.652)",
633 error: "oklch(0.637823 0.237287 25.436)",
634 errorForeground: "oklch(0.509494 0.208583 28.513)",
635 errorSurface: "oklch(0.941043 0.019582 4.235)",
636 warning: "oklch(0.772406 0.172798 65.367)",
637 warningForeground: "oklch(0.549154 0.156188 45.359)",
638 warningSurface: "oklch(0.957054 0.016197 69.932)",
639 update: "oklch(0.525348 0.15373 294.176)",
640 updateForeground: "oklch(0.389926 0.10825 294.547)",
641 updateSurface: "oklch(0.90602 0.025754 299.867)",
642 accentSurface: "oklch(0.914882 0.022965 299.986)",
643 accentSurfaceForeground: "oklch(0.222003 0.03479 328.979)",
644 messageSurface: "oklch(0.897143 0.028558 299.758)",
645 messageForeground: "oklch(0.222003 0.03479 328.979)",
646 messageAction: "oklch(0.516084 0.185229 340.776)",
647 messageActionForeground: "oklch(0.990339 0.008411 325.64)",
648 messageActionHover: "oklch(0.471003 0.16748 340.687)",
649 codeBackground: "oklch(0.95997 0.004338 306.542)",
650 codeForeground: "oklch(0.222003 0.03479 328.979)",
651 sidebar: "oklch(0.941387 0.014687 300.474)",
652 sidebarForeground: "oklch(0.222003 0.03479 328.979)",
653 sidebarMutedForeground: "oklch(0.518417 0.023683 320.681)",
654 sidebarControlSurface: "oklch(0.890512 0.0155 303.803)",
655 sidebarRowHover: "oklch(0.892522 0.030022 299.704)",
656 sidebarRowActive: "oklch(0.85971 0.040501 299.36)",
657 sidebarRowSelected: "oklch(0.843236 0.045818 299.198)",
658 sidebarBorder: "oklch(0.864805 0.015938 305.371)",
659 terminalBackground: "oklch(0.976531 0.003855 303.226)",
660 terminalForeground: "oklch(0.222003 0.03479 328.979)",
661 terminalCursor: "oklch(0.525348 0.15373 294.176)",
662 terminalSelection: "oklch(0.897143 0.028558 299.758)",
663 terminalScrollbar: "oklch(0.828195 0.008526 318.858)",
664 terminalScrollbarHover: "oklch(0.758596 0.010892 321.538)",
665 },
666 variants: {
667 dark: {
668 canvas: "oklch(0.225975 0.031062 293.741)",
669 chrome: "oklch(0.225975 0.031062 293.741)",
670 toolbar: "oklch(0.225975 0.031062 293.741)",
671 toolbarForeground: "oklch(0.990339 0.008411 325.64)",
672 toolbarBorder: "oklch(0.395417 0.085554 294.182)",
673 toolbarControl: "oklch(0.325405 0.063614 294.23)",
674 toolbarControlForeground: "oklch(0.990339 0.008411 325.64)",
675 toolbarControlHover: "oklch(0.372436 0.07841 294.204)",
676 surface: "oklch(0.225975 0.031062 293.741)",
677 surfaceRaised: "oklch(0.335291 0.026008 296.394)",
678 surfaceOverlay: "oklch(0.386739 0.024023 297.509)",
679 text: "oklch(0.990339 0.008411 325.64)",
680 textMuted: "oklch(0.640465 0.016197 304.171)",
681 border: "oklch(0.40874 0.058536 295.893)",
682 input: "oklch(0.46756 0.065775 296.265)",
683 focus: "oklch(0.671712 0.169136 293.929)",
684 accent: "oklch(0.671712 0.169136 293.929)",
685 accentForeground: "oklch(0.222003 0.03479 328.979)",
686 secondary: "oklch(0.325405 0.063614 294.23)",
687 secondaryForeground: "oklch(0.990339 0.008411 325.64)",
688 muted: "oklch(0.291515 0.05276 294.209)",
689 mutedForeground: "oklch(0.663321 0.025932 301.862)",
690 placeholder: "oklch(0.706249 0.014508 306.607)",
691 secondaryLabel: "oklch(0.640465 0.016197 304.171)",
692 iconMuted: "oklch(0.640465 0.016197 304.171)",
693 error: "oklch(0.655108 0.221148 23.473)",
694 errorForeground: "oklch(0.702184 0.189226 22.228)",
695 errorSurface: "oklch(0.291658 0.054707 352.238)",
696 warning: "oklch(0.772406 0.172798 65.367)",
697 warningForeground: "oklch(0.829017 0.171221 81.038)",
698 warningSurface: "oklch(0.318952 0.033845 51.646)",
699 update: "oklch(0.671712 0.169136 293.929)",
700 updateForeground: "oklch(0.785032 0.108439 296.344)",
701 updateSurface: "oklch(0.381668 0.081286 294.195)",
702 accentSurface: "oklch(0.372436 0.07841 294.204)",
703 accentSurfaceForeground: "oklch(0.990339 0.008411 325.64)",
704 messageSurface: "oklch(0.399975 0.086965 294.177)",
705 messageForeground: "oklch(0.990339 0.008411 325.64)",
706 messageAction: "oklch(0.789904 0.130063 337.621)",
707 messageActionForeground: "oklch(0.222003 0.03479 328.979)",
708 messageActionHover: "oklch(0.813537 0.114101 337.23)",
709 codeBackground: "oklch(0.281873 0.028308 295.193)",
710 codeForeground: "oklch(0.990339 0.008411 325.64)",
711 sidebar: "oklch(0.266743 0.044689 294.138)",
712 sidebarForeground: "oklch(0.990339 0.008411 325.64)",
713 sidebarMutedForeground: "oklch(0.668773 0.021522 302.949)",
714 sidebarControlSurface: "oklch(0.399977 0.035678 297.031)",
715 sidebarRowHover: "oklch(0.320808 0.062152 294.23)",
716 sidebarRowActive: "oklch(0.355677 0.073167 294.217)",
717 sidebarRowSelected: "oklch(0.372806 0.078525 294.203)",
718 sidebarBorder: "oklch(0.545895 0.027522 299.871)",
719 terminalBackground: "oklch(0.225975 0.031062 293.741)",
720 terminalForeground: "oklch(0.990339 0.008411 325.64)",
721 terminalCursor: "oklch(0.671712 0.169136 293.929)",
722 terminalSelection: "oklch(0.395417 0.085554 294.182)",
723 terminalScrollbar: "oklch(0.578663 0.017888 302.229)",
724 terminalScrollbarHover: "oklch(0.676012 0.015271 305.433)",
725 },
726 },
727 sidebarArtwork: true,
728};
729
730export const BUILT_IN_THEMES: ReadonlyArray<ThemeDefinition> = [
731 T3_CHAT_THEME,
732 GROVE_THEME,
733 OCEAN_THEME,
734 EMBER_THEME,
735 IRIS_THEME,
736];
737
738export function getBuiltInTheme(id: string): ThemeDefinition | null {
739 return BUILT_IN_THEMES.find((theme) => theme.id === id) ?? null;
740}
741
742export function getThemeColorsForAppearance(
743 theme: ThemeDefinition,
744 appearance: ThemeAppearance,
745): ThemeColors | null {
746 if (theme.appearance === appearance) return theme.colors;
747 return theme.variants?.[appearance] ?? null;
748}