common.ts

 1import { ThemeLicenseType, ThemeSyntax, ThemeFamilyMeta } from "../../common"
 2
 3export interface Variant {
 4    colors: {
 5        base00: string
 6        base01: string
 7        base02: string
 8        base03: string
 9        base04: string
10        base05: string
11        base06: string
12        base07: string
13        base08: string
14        base09: string
15        base0A: string
16        base0B: string
17        base0C: string
18        base0D: string
19        base0E: string
20        base0F: string
21    }
22}
23
24export const meta: ThemeFamilyMeta = {
25    name: "Atelier",
26    author: "Bram de Haan (http://atelierbramdehaan.nl)",
27    license_type: ThemeLicenseType.MIT,
28    license_url:
29        "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/",
30}
31
32export const build_syntax = (variant: Variant): ThemeSyntax => {
33    const { colors } = variant
34    return {
35        primary: { color: colors.base06 },
36        comment: { color: colors.base03 },
37        "punctuation.delimiter": { color: colors.base05 },
38        "punctuation.bracket": { color: colors.base05 },
39        "punctuation.special": { color: colors.base0F },
40        "string.special.symbol": { color: colors.base0B },
41        operator: { color: colors.base05 },
42        function: { color: colors.base0D },
43        "function.method": { color: colors.base0D },
44        "function.special.definition": { color: colors.base0A },
45        string: { color: colors.base0B },
46        "string.special": { color: colors.base0F },
47        "string.regex": { color: colors.base0C },
48        type: { color: colors.base0A },
49        number: { color: colors.base09 },
50        property: { color: colors.base08 },
51        variable: { color: colors.base06 },
52        "variable.special": { color: colors.base0E },
53        variant: { color: colors.base0A },
54        keyword: { color: colors.base0E },
55    }
56}