MCPcopy
hub / github.com/gitify-app/gitify / mapThemeModeToColorScheme

Function mapThemeModeToColorScheme

src/renderer/utils/ui/theme.ts:26–59  ·  view source on GitHub ↗
(
  themeMode: Theme,
  increaseContrast: boolean,
)

Source from the content-addressed store, hash-verified

24}
25
26export function mapThemeModeToColorScheme(
27 themeMode: Theme,
28 increaseContrast: boolean,
29): string | null {
30 let base: string | null;
31
32 switch (themeMode) {
33 case Theme.LIGHT:
34 base = 'light';
35 break;
36 case Theme.LIGHT_COLORBLIND:
37 base = 'light_colorblind';
38 break;
39 case Theme.LIGHT_TRITANOPIA:
40 base = 'light_tritanopia';
41 break;
42 case Theme.DARK:
43 base = 'dark';
44 break;
45 case Theme.DARK_COLORBLIND:
46 base = 'dark_colorblind';
47 break;
48 case Theme.DARK_TRITANOPIA:
49 base = 'dark_tritanopia';
50 break;
51 case Theme.DARK_DIMMED:
52 base = 'dark_dimmed';
53 break;
54 default:
55 return null;
56 }
57
58 return increaseContrast ? `${base}_high_contrast` : base;
59}

Callers 2

theme.test.tsFile · 0.90
AppProviderFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected