MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / getColorPalette

Function getColorPalette

apps/kimi-code/src/tui/theme/index.ts:43–53  ·  view source on GitHub ↗
(theme: ThemeName)

Source from the content-addressed store, hash-verified

41 * missing / invalid files fall back to dark palette.
42 */
43export async function getColorPalette(theme: ThemeName): Promise<ColorPalette> {
44 if (theme === 'light') return getBuiltInPalette('light');
45 if (theme === 'dark') return getBuiltInPalette('dark');
46 if (theme === 'auto') {
47 const detected = await detectTerminalTheme();
48 return getBuiltInPalette(detected);
49 }
50 // custom theme
51 const custom = await loadCustomThemeMerged(theme);
52 return custom ?? getBuiltInPalette('dark');
53}
54
55/**
56 * Synchronous fallback used by paths that cannot wait on terminal probes.

Callers 2

applyThemeMethod · 0.90
runShellFunction · 0.90

Calls 3

getBuiltInPaletteFunction · 0.90
detectTerminalThemeFunction · 0.90
loadCustomThemeMergedFunction · 0.90

Tested by

no test coverage detected