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 Light`,
9 ...metaCommon,
10 url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest/",
11 },
12 colors: {
13 base00: "#f1efee",
14 base01: "#e6e2e0",
15 base02: "#a8a19f",
16 base03: "#9c9491",
17 base04: "#766e6b",
18 base05: "#68615e",
19 base06: "#2c2421",
20 base07: "#1b1918",
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 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