Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 84x 84x 84x 12x | import { grey } from "@/theme/ui/palette";
import { getPrimary } from "@/theme/ui/options/presets";
import { APP_PRESET_TO_PALETTE } from "@/theme/ui/presetMap";
function buildColorPreset(appPreset, label) {
const palettePreset = APP_PRESET_TO_PALETTE[appPreset] || "default";
const colors = getPrimary(palettePreset);
return {
label,
palettePreset,
lightPrimary: colors.primary,
lightSecondary: colors.secondary,
gradient: `linear-gradient(135deg, ${colors.primary.main} 0%, ${colors.secondary.main} 100%)`,
darkPrimary: { main: grey[900] },
darkSecondary: { main: grey[800] },
};
}
/** App theme presets with primary/secondary colors and sidebar gradients. */
export const colorPresets = {
default: buildColorPreset("default", "Soft Blue"),
blue: buildColorPreset("blue", "Blue"),
green: buildColorPreset("green", "Green"),
purple: buildColorPreset("purple", "Purple"),
navy: buildColorPreset("navy", "Navy"),
black: buildColorPreset("black", "Black"),
gray: buildColorPreset("gray", "Gray"),
};
|