atelier-heath-light.ts

 1import { chroma, ThemeAppearance, ThemeConfig, color_ramp } from "../../common"
 2import { meta, build_syntax, Variant } from "./common"
 3
 4const variant: Variant = {
 5    colors: {
 6        base00: "#f7f3f7",
 7        base01: "#d8cad8",
 8        base02: "#ab9bab",
 9        base03: "#9e8f9e",
10        base04: "#776977",
11        base05: "#695d69",
12        base06: "#292329",
13        base07: "#1b181b",
14        base08: "#ca402b",
15        base09: "#a65926",
16        base0A: "#bb8a35",
17        base0B: "#918b3b",
18        base0C: "#159393",
19        base0D: "#516aec",
20        base0E: "#7b59c0",
21        base0F: "#cc33cc",
22    },
23}
24
25const syntax = build_syntax(variant)
26
27const get_theme = (variant: Variant): ThemeConfig => {
28    const { colors } = variant
29
30    return {
31        name: `${meta.name} Heath Light`,
32        author: meta.author,
33        appearance: ThemeAppearance.Light,
34        license_type: meta.license_type,
35        license_url: meta.license_url,
36        license_file: `${__dirname}/LICENSE`,
37        input_color: {
38            neutral: chroma.scale(
39                [
40                    colors.base00,
41                    colors.base01,
42                    colors.base02,
43                    colors.base03,
44                    colors.base04,
45                    colors.base05,
46                    colors.base06,
47                    colors.base07,
48                ].reverse()
49            ),
50            red: color_ramp(chroma(colors.base08)),
51            orange: color_ramp(chroma(colors.base09)),
52            yellow: color_ramp(chroma(colors.base0A)),
53            green: color_ramp(chroma(colors.base0B)),
54            cyan: color_ramp(chroma(colors.base0C)),
55            blue: color_ramp(chroma(colors.base0D)),
56            violet: color_ramp(chroma(colors.base0E)),
57            magenta: color_ramp(chroma(colors.base0F)),
58        },
59        override: { syntax },
60    }
61}
62
63export const theme = get_theme(variant)