atelier-seaside-light.ts

 1import chroma from "chroma-js"
 2import { Meta } from "./common/colorScheme"
 3import { colorRamp, createColorScheme } from "./common/ramps"
 4import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common"
 5
 6const variant: Variant = {
 7    meta: {
 8        name: `${name} Seaside Light`,
 9        ...metaCommon,
10        url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/",
11    },
12    colors: {
13        base00: "#f4fbf4",
14        base01: "#cfe8cf",
15        base02: "#8ca68c",
16        base03: "#809980",
17        base04: "#687d68",
18        base05: "#5e6e5e",
19        base06: "#242924",
20        base07: "#131513",
21        base08: "#e6193c",
22        base09: "#87711d",
23        base0A: "#98981b",
24        base0B: "#29a329",
25        base0C: "#1999b3",
26        base0D: "#3d62f5",
27        base0E: "#ad2bee",
28        base0F: "#e619c3",
29    },
30}
31
32const syntax = buildSyntax(variant)
33
34const theme = (variant: Variant) => {
35    const { meta, colors } = variant
36
37    return createColorScheme(
38        meta.name,
39        true,
40        {
41            neutral: chroma.scale(
42                [
43                    colors.base00,
44                    colors.base01,
45                    colors.base02,
46                    colors.base03,
47                    colors.base04,
48                    colors.base05,
49                    colors.base06,
50                    colors.base07,
51                ].reverse()
52            ),
53            red: colorRamp(chroma(colors.base08)),
54            orange: colorRamp(chroma(colors.base09)),
55            yellow: colorRamp(chroma(colors.base0A)),
56            green: colorRamp(chroma(colors.base0B)),
57            cyan: colorRamp(chroma(colors.base0C)),
58            blue: colorRamp(chroma(colors.base0D)),
59            violet: colorRamp(chroma(colors.base0E)),
60            magenta: colorRamp(chroma(colors.base0F)),
61        },
62        syntax
63    )
64}
65
66export const dark = theme(variant)
67
68export const meta: Meta = variant.meta