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} Forest Dark`,
9 ...metaCommon,
10 url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest/",
11 },
12 colors: {
13 base00: "#1b1918",
14 base01: "#2c2421",
15 base02: "#68615e",
16 base03: "#766e6b",
17 base04: "#9c9491",
18 base05: "#a8a19f",
19 base06: "#e6e2e0",
20 base07: "#f1efee",
21 base08: "#f22c40",
22 base09: "#df5320",
23 base0A: "#c38418",
24 base0B: "#7b9726",
25 base0C: "#3d97b8",
26 base0D: "#407ee7",
27 base0E: "#6666ea",
28 base0F: "#c33ff3",
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 false,
40 {
41 neutral: chroma.scale([
42 colors.base00,
43 colors.base01,
44 colors.base02,
45 colors.base03,
46 colors.base04,
47 colors.base05,
48 colors.base06,
49 colors.base07,
50 ]),
51 red: colorRamp(chroma(colors.base08)),
52 orange: colorRamp(chroma(colors.base09)),
53 yellow: colorRamp(chroma(colors.base0A)),
54 green: colorRamp(chroma(colors.base0B)),
55 cyan: colorRamp(chroma(colors.base0C)),
56 blue: colorRamp(chroma(colors.base0D)),
57 violet: colorRamp(chroma(colors.base0E)),
58 magenta: colorRamp(chroma(colors.base0F)),
59 },
60 syntax
61 )
62}
63
64export const dark = theme(variant)
65
66export const meta: Meta = variant.meta