cleaning up code

This commit is contained in:
2026-08-09 09:54:52 -04:00
parent 1d06156b8b
commit 2abdbaa4e9
59 changed files with 518 additions and 2929 deletions

View File

@@ -13,15 +13,6 @@ export function clearPaletteCache() {
cached = null;
}
export function detectSystemTheme(colors: TerminalColors) {
const bg = RGBA.fromHex(
colors.defaultBackground ?? colors.palette[0] ?? "#000000",
);
const luminance = 0.299 * bg.r + 0.587 * bg.g + 0.114 * bg.b;
const mode = luminance > 0.5 ? "light" : "dark";
return { mode, background: bg };
}
export function generateSystemTheme(
colors: TerminalColors,
mode: "dark" | "light",