-
Notifications
You must be signed in to change notification settings - Fork 0
/
mod.ts
51 lines (49 loc) · 1.26 KB
/
mod.ts
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import * as palettes from "./palettes.ts";
import { colorsToTheme, convertPaletteToColors } from "./generate.ts";
const darkColors = convertPaletteToColors(palettes.dark, {
primary: "purple",
secondary: "blue",
});
export const dark = colorsToTheme(
{
name: "Dark",
baseShade: 600,
brightShade: 700,
polarity: "dark",
},
darkColors,
{
lightness: 1,
contrast: 1,
saturation: 100,
},
(background) => ({
background: background.set("oklch.l", 0.14).set("oklch.c", 0.03),
surface: background.set("oklch.l", 0.16).set("oklch.c", 0.055),
overlay: background.set("oklch.l", 0.20).set("oklch.c", 0.055),
}),
);
const lightColors = convertPaletteToColors(palettes.light, {
// I prefer blue as the primary color in light themes. Deal with it:tm:
primary: "blue",
secondary: "purple",
});
export const light = colorsToTheme(
{
name: "Light",
baseShade: 400,
brightShade: 500,
polarity: "light",
},
lightColors,
{
lightness: 95,
contrast: 1.5,
saturation: 100,
},
(background) => ({
background: background.set("oklch.l", 0.90).set("oklch.c", 0.035),
surface: background.set("oklch.l", 0.87).set("oklch.c", 0.045),
overlay: background.set("oklch.l", 0.84).set("oklch.c", 0.045),
}),
);