1import { chroma, ThemeAppearance, ThemeConfig, colorRamp } from "../../common"
2import { meta, buildSyntax, Variant } from "./common"
3
4const variant: Variant = {
5 colors: {
6 base00: "#22221b",
7 base01: "#302f27",
8 base02: "#5f5e4e",
9 base03: "#6c6b5a",
10 base04: "#878573",
11 base05: "#929181",
12 base06: "#e7e6df",
13 base07: "#f4f3ec",
14 base08: "#ba6236",
15 base09: "#ae7313",
16 base0A: "#a5980d",
17 base0B: "#7d9726",
18 base0C: "#5b9d48",
19 base0D: "#36a166",
20 base0E: "#5f9182",
21 base0F: "#9d6c7c",
22 },
23}
24
25const syntax = buildSyntax(variant)
26
27const getTheme = (variant: Variant): ThemeConfig => {
28 const { colors } = variant
29
30 return {
31 name: `${meta.name} Estuary Dark`,
32 author: meta.author,
33 appearance: ThemeAppearance.Dark,
34 licenseType: meta.licenseType,
35 licenseUrl: meta.licenseUrl,
36 licenseFile: `${__dirname}/LICENSE`,
37 inputColor: {
38 neutral: chroma.scale([
39 colors.base00,
40 colors.base01,
41 colors.base02,
42 colors.base03,
43 colors.base04,
44 colors.base05,
45 colors.base06,
46 colors.base07,
47 ]),
48 red: colorRamp(chroma(colors.base08)),
49 orange: colorRamp(chroma(colors.base09)),
50 yellow: colorRamp(chroma(colors.base0A)),
51 green: colorRamp(chroma(colors.base0B)),
52 cyan: colorRamp(chroma(colors.base0C)),
53 blue: colorRamp(chroma(colors.base0D)),
54 violet: colorRamp(chroma(colors.base0E)),
55 magenta: colorRamp(chroma(colors.base0F)),
56 },
57 override: { syntax },
58 }
59}
60
61export const theme = getTheme(variant)