users/ryan/modules/simple-bar/simple-bar-source/lib/styles/theme.js

c589cef163fddefcca977f130319f6b5e3657621 · 747 B · 21 lines raw

1 import * as Themes from "./themes";
2 import * as Pywal from "./pywal/pywal-colors";
3
4 const WITH_PYWAL = false;
5
6 const overrideColors = WITH_PYWAL ? Pywal.colors : {};
7
8 /**
9 * Generates color themes by merging the specified themes with override colors.
10 *
11 * @param {Object} themes - An object containing the light and dark theme names.
12 * @param {string} themes.lightTheme - The name of the light theme.
13 * @param {string} themes.darkTheme - The name of the dark theme.
14 * @returns {Object} An object containing the light and dark color themes.
15 */
16 export function colors(themes) {
17 return {
18 light: { ...Themes.collection[themes.lightTheme], ...overrideColors },
19 dark: { ...Themes.collection[themes.darkTheme], ...overrideColors },
20 };
21 }