@silvery/theme 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/package.json +36 -0
  2. package/src/ThemeContext.tsx +62 -0
  3. package/src/alias.ts +94 -0
  4. package/src/auto-generate.ts +126 -0
  5. package/src/builder.ts +218 -0
  6. package/src/cli.ts +275 -0
  7. package/src/color.ts +142 -0
  8. package/src/contrast.ts +75 -0
  9. package/src/css.ts +51 -0
  10. package/src/derive.ts +167 -0
  11. package/src/detect.ts +263 -0
  12. package/src/export/base16.ts +64 -0
  13. package/src/generate.ts +79 -0
  14. package/src/generators.ts +255 -0
  15. package/src/import/base16.ts +150 -0
  16. package/src/import/types.ts +47 -0
  17. package/src/index.ts +2 -0
  18. package/src/palettes/ayu.ts +92 -0
  19. package/src/palettes/catppuccin.ts +118 -0
  20. package/src/palettes/dracula.ts +34 -0
  21. package/src/palettes/edge.ts +63 -0
  22. package/src/palettes/everforest.ts +63 -0
  23. package/src/palettes/gruvbox.ts +62 -0
  24. package/src/palettes/horizon.ts +35 -0
  25. package/src/palettes/index.ts +293 -0
  26. package/src/palettes/kanagawa.ts +91 -0
  27. package/src/palettes/material.ts +64 -0
  28. package/src/palettes/modus.ts +63 -0
  29. package/src/palettes/monokai.ts +64 -0
  30. package/src/palettes/moonfly.ts +35 -0
  31. package/src/palettes/nightfly.ts +35 -0
  32. package/src/palettes/nightfox.ts +63 -0
  33. package/src/palettes/nord.ts +34 -0
  34. package/src/palettes/one-dark.ts +34 -0
  35. package/src/palettes/oxocarbon.ts +63 -0
  36. package/src/palettes/palenight.ts +36 -0
  37. package/src/palettes/rose-pine.ts +90 -0
  38. package/src/palettes/snazzy.ts +35 -0
  39. package/src/palettes/solarized.ts +62 -0
  40. package/src/palettes/sonokai.ts +35 -0
  41. package/src/palettes/tokyo-night.ts +90 -0
  42. package/src/resolve.ts +44 -0
  43. package/src/state.ts +58 -0
  44. package/src/theme.ts +148 -0
  45. package/src/types.ts +223 -0
  46. package/src/validate-theme.ts +100 -0
  47. package/src/validate.ts +56 -0
@@ -0,0 +1,150 @@
1
+ /**
2
+ * Import Base16 YAML/JSON schemes into ColorPalette format.
3
+ *
4
+ * Base16 defines 16 colors (base00–base0F). We map them to ColorPalette's
5
+ * 22 colors, deriving bright variants and special colors.
6
+ *
7
+ * @see https://github.com/chriskempson/base16
8
+ */
9
+
10
+ import { darken, brighten, hexToRgb } from "../color"
11
+ import type { ColorPalette } from "../types"
12
+ import type { Base16Scheme } from "./types"
13
+ import { BASE16_KEYS } from "./types"
14
+
15
+ // ============================================================================
16
+ // YAML Parser (minimal — Base16 YAML is just `key: "value"` lines)
17
+ // ============================================================================
18
+
19
+ /**
20
+ * Parse Base16 YAML into a Base16Scheme object.
21
+ * Handles both quoted and unquoted values, comments, and blank lines.
22
+ */
23
+ function parseBase16Yaml(yaml: string): Base16Scheme {
24
+ const result: Record<string, string> = {}
25
+
26
+ for (const raw of yaml.split("\n")) {
27
+ const line = raw.trim()
28
+ if (!line || line.startsWith("#")) continue
29
+
30
+ const colonIdx = line.indexOf(":")
31
+ if (colonIdx === -1) continue
32
+
33
+ const key = line.slice(0, colonIdx).trim()
34
+ let value = line.slice(colonIdx + 1).trim()
35
+
36
+ // Strip surrounding quotes (single or double)
37
+ if ((value.startsWith('"') && value.endsWith('"')) || (value.startsWith("'") && value.endsWith("'"))) {
38
+ value = value.slice(1, -1)
39
+ }
40
+
41
+ // Strip inline comments (only after unquoted values)
42
+ const commentIdx = value.indexOf("#")
43
+ if (commentIdx > 0) {
44
+ value = value.slice(0, commentIdx).trim()
45
+ }
46
+
47
+ result[key] = value
48
+ }
49
+
50
+ // Validate required fields
51
+ if (!result.scheme) {
52
+ throw new Error("Base16 YAML missing required field: scheme")
53
+ }
54
+
55
+ for (const key of BASE16_KEYS) {
56
+ if (!result[key]) {
57
+ throw new Error(`Base16 YAML missing required color: ${key}`)
58
+ }
59
+ // Validate hex format (6 hex chars, no # prefix)
60
+ if (!/^[0-9a-fA-F]{6}$/.test(result[key]!)) {
61
+ throw new Error(`Base16 color ${key} must be a 6-digit hex string without '#', got: "${result[key]}"`)
62
+ }
63
+ }
64
+
65
+ return result as unknown as Base16Scheme
66
+ }
67
+
68
+ // ============================================================================
69
+ // Luminance Detection
70
+ // ============================================================================
71
+
72
+ /** Compute relative luminance (WCAG 2.0) from a hex color with `#` prefix. */
73
+ function luminance(hex: string): number {
74
+ const rgb = hexToRgb(hex)
75
+ if (!rgb) return 0
76
+ const [r, g, b] = rgb.map((c) => {
77
+ const s = c / 255
78
+ return s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4)
79
+ })
80
+ return 0.2126 * r! + 0.7152 * g! + 0.0722 * b!
81
+ }
82
+
83
+ // ============================================================================
84
+ // Import
85
+ // ============================================================================
86
+
87
+ /** Normalize a bare hex string to `#RRGGBB` (uppercase). */
88
+ function hex(bare: string): string {
89
+ return `#${bare.toUpperCase()}`
90
+ }
91
+
92
+ /**
93
+ * Import a Base16 YAML (or JSON) scheme into a ColorPalette.
94
+ *
95
+ * Mapping:
96
+ * base00 → background, base01 → brightBlack, base02 → selectionBackground,
97
+ * base03 → white (muted fg), base05 → foreground/brightWhite,
98
+ * base08 → red, base09 → brightRed, base0A → yellow,
99
+ * base0B → green, base0C → cyan, base0D → blue, base0E → magenta,
100
+ * base0F → brightMagenta.
101
+ *
102
+ * Bright color variants are derived by brightening normals.
103
+ * `dark` is inferred from base00 luminance.
104
+ */
105
+ export function importBase16(yamlOrJson: string): ColorPalette {
106
+ const scheme = parseBase16Yaml(yamlOrJson)
107
+ return base16ToColorPalette(scheme)
108
+ }
109
+
110
+ /** Convert a parsed Base16Scheme to ColorPalette. */
111
+ export function base16ToColorPalette(scheme: Base16Scheme): ColorPalette {
112
+ const bg = hex(scheme.base00)
113
+ const fg = hex(scheme.base05)
114
+ const isDark = luminance(bg) < 0.179
115
+
116
+ const black = isDark ? darken(bg, 0.15) : brighten(bg, 0.15)
117
+ const red = hex(scheme.base08)
118
+ const green = hex(scheme.base0B)
119
+ const yellow = hex(scheme.base0A)
120
+ const blue = hex(scheme.base0D)
121
+ const magenta = hex(scheme.base0E)
122
+ const cyan = hex(scheme.base0C)
123
+
124
+ return {
125
+ name: scheme.scheme,
126
+ dark: isDark,
127
+ black,
128
+ red,
129
+ green,
130
+ yellow,
131
+ blue,
132
+ magenta,
133
+ cyan,
134
+ white: hex(scheme.base03),
135
+ brightBlack: hex(scheme.base01),
136
+ brightRed: hex(scheme.base09),
137
+ brightGreen: brighten(green, 0.15),
138
+ brightYellow: brighten(yellow, 0.15),
139
+ brightBlue: brighten(blue, 0.15),
140
+ brightMagenta: hex(scheme.base0F),
141
+ brightCyan: brighten(cyan, 0.15),
142
+ brightWhite: fg,
143
+ foreground: fg,
144
+ background: bg,
145
+ cursorColor: fg,
146
+ cursorText: bg,
147
+ selectionBackground: hex(scheme.base02),
148
+ selectionForeground: fg,
149
+ }
150
+ }
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Base16 scheme type — the 16-color format used by hundreds of community themes.
3
+ *
4
+ * @see https://github.com/chriskempson/base16
5
+ */
6
+
7
+ /** A parsed Base16 color scheme. All hex values are WITHOUT `#` prefix. */
8
+ export interface Base16Scheme {
9
+ scheme: string
10
+ author: string
11
+ base00: string
12
+ base01: string
13
+ base02: string
14
+ base03: string
15
+ base04: string
16
+ base05: string
17
+ base06: string
18
+ base07: string
19
+ base08: string
20
+ base09: string
21
+ base0A: string
22
+ base0B: string
23
+ base0C: string
24
+ base0D: string
25
+ base0E: string
26
+ base0F: string
27
+ }
28
+
29
+ /** All Base16 color keys in order. */
30
+ export const BASE16_KEYS = [
31
+ "base00",
32
+ "base01",
33
+ "base02",
34
+ "base03",
35
+ "base04",
36
+ "base05",
37
+ "base06",
38
+ "base07",
39
+ "base08",
40
+ "base09",
41
+ "base0A",
42
+ "base0B",
43
+ "base0C",
44
+ "base0D",
45
+ "base0E",
46
+ "base0F",
47
+ ] as const
package/src/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./ThemeContext"
2
+ export * from "./theme"
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Ayu palettes — warm, modern theme in three variants.
3
+ * Source: https://github.com/ayu-theme/ayu-colors
4
+ * Reference: https://github.com/Shatur/neovim-ayu
5
+ */
6
+
7
+ import type { ColorPalette } from "../types"
8
+ import { brighten } from "../color"
9
+
10
+ /** Ayu Dark — deep dark variant with warm accents. */
11
+ export const ayuDark: ColorPalette = {
12
+ name: "ayu-dark",
13
+ dark: true,
14
+ black: "#05070A",
15
+ red: "#D95757",
16
+ green: "#AAD94C",
17
+ yellow: "#E6B450",
18
+ blue: "#59C2FF",
19
+ magenta: "#D2A6FF",
20
+ cyan: "#95E6CB",
21
+ white: "#636A72",
22
+ brightBlack: "#11151C",
23
+ brightRed: "#F29668",
24
+ brightGreen: brighten("#AAD94C", 0.15),
25
+ brightYellow: brighten("#E6B450", 0.15),
26
+ brightBlue: brighten("#59C2FF", 0.15),
27
+ brightMagenta: "#F07178",
28
+ brightCyan: brighten("#95E6CB", 0.15),
29
+ brightWhite: "#BFBDB6",
30
+ foreground: "#BFBDB6",
31
+ background: "#0B0E14",
32
+ cursorColor: "#BFBDB6",
33
+ cursorText: "#0B0E14",
34
+ selectionBackground: "#565B66",
35
+ selectionForeground: "#BFBDB6",
36
+ }
37
+
38
+ /** Ayu Mirage — balanced dark variant with softer contrast. */
39
+ export const ayuMirage: ColorPalette = {
40
+ name: "ayu-mirage",
41
+ dark: true,
42
+ black: "#101521",
43
+ red: "#FF6666",
44
+ green: "#D5FF80",
45
+ yellow: "#FFCC66",
46
+ blue: "#73D0FF",
47
+ magenta: "#DFBFFF",
48
+ cyan: "#95E6CB",
49
+ white: "#6C7A8B",
50
+ brightBlack: "#171B24",
51
+ brightRed: "#F29E74",
52
+ brightGreen: brighten("#D5FF80", 0.15),
53
+ brightYellow: brighten("#FFCC66", 0.15),
54
+ brightBlue: brighten("#73D0FF", 0.15),
55
+ brightMagenta: "#F28779",
56
+ brightCyan: brighten("#95E6CB", 0.15),
57
+ brightWhite: "#CCCAC2",
58
+ foreground: "#CCCAC2",
59
+ background: "#1F2430",
60
+ cursorColor: "#CCCAC2",
61
+ cursorText: "#1F2430",
62
+ selectionBackground: "#707A8C",
63
+ selectionForeground: "#CCCAC2",
64
+ }
65
+
66
+ /** Ayu Light — clean light variant. */
67
+ export const ayuLight: ColorPalette = {
68
+ name: "ayu-light",
69
+ dark: false,
70
+ black: "#E7EAED",
71
+ red: "#E65050",
72
+ green: "#86B300",
73
+ yellow: "#FFAA33",
74
+ blue: "#399EE6",
75
+ magenta: "#A37ACC",
76
+ cyan: "#4CBF99",
77
+ white: "#ABADB1",
78
+ brightBlack: "#F3F4F5",
79
+ brightRed: "#ED9366",
80
+ brightGreen: brighten("#86B300", 0.15),
81
+ brightYellow: brighten("#FFAA33", 0.15),
82
+ brightBlue: brighten("#399EE6", 0.15),
83
+ brightMagenta: "#F07171",
84
+ brightCyan: brighten("#4CBF99", 0.15),
85
+ brightWhite: "#5C6166",
86
+ foreground: "#5C6166",
87
+ background: "#F8F9FA",
88
+ cursorColor: "#5C6166",
89
+ cursorText: "#F8F9FA",
90
+ selectionBackground: "#8A9199",
91
+ selectionForeground: "#5C6166",
92
+ }
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Catppuccin palettes — the most popular 4-flavor theme system.
3
+ */
4
+
5
+ import type { ColorPalette } from "../types"
6
+ import { brighten } from "../color"
7
+
8
+ /** Catppuccin Mocha — the classic dark variant. */
9
+ export const catppuccinMocha: ColorPalette = {
10
+ name: "catppuccin-mocha",
11
+ dark: true,
12
+ black: "#11111B",
13
+ red: "#F38BA8",
14
+ green: "#A6E3A1",
15
+ yellow: "#F9E2AF",
16
+ blue: "#89B4FA",
17
+ magenta: "#CBA6F7",
18
+ cyan: "#94E2D5",
19
+ white: "#A6ADC8",
20
+ brightBlack: "#313244",
21
+ brightRed: "#FAB387",
22
+ brightGreen: brighten("#A6E3A1", 0.15),
23
+ brightYellow: brighten("#F9E2AF", 0.15),
24
+ brightBlue: brighten("#89B4FA", 0.15),
25
+ brightMagenta: "#F5C2E7",
26
+ brightCyan: brighten("#94E2D5", 0.15),
27
+ brightWhite: "#CDD6F4",
28
+ foreground: "#CDD6F4",
29
+ background: "#1E1E2E",
30
+ cursorColor: "#CDD6F4",
31
+ cursorText: "#1E1E2E",
32
+ selectionBackground: "#6C7086",
33
+ selectionForeground: "#CDD6F4",
34
+ }
35
+
36
+ /** Catppuccin Frappe — muted dark variant. */
37
+ export const catppuccinFrappe: ColorPalette = {
38
+ name: "catppuccin-frappe",
39
+ dark: true,
40
+ black: "#232634",
41
+ red: "#E78284",
42
+ green: "#A6D189",
43
+ yellow: "#E5C890",
44
+ blue: "#8CAAEE",
45
+ magenta: "#CA9EE6",
46
+ cyan: "#81C8BE",
47
+ white: "#A5ADCE",
48
+ brightBlack: "#414559",
49
+ brightRed: "#EF9F76",
50
+ brightGreen: brighten("#A6D189", 0.15),
51
+ brightYellow: brighten("#E5C890", 0.15),
52
+ brightBlue: brighten("#8CAAEE", 0.15),
53
+ brightMagenta: "#F4B8E4",
54
+ brightCyan: brighten("#81C8BE", 0.15),
55
+ brightWhite: "#C6D0F5",
56
+ foreground: "#C6D0F5",
57
+ background: "#303446",
58
+ cursorColor: "#C6D0F5",
59
+ cursorText: "#303446",
60
+ selectionBackground: "#737994",
61
+ selectionForeground: "#C6D0F5",
62
+ }
63
+
64
+ /** Catppuccin Macchiato — warm dark variant. */
65
+ export const catppuccinMacchiato: ColorPalette = {
66
+ name: "catppuccin-macchiato",
67
+ dark: true,
68
+ black: "#181926",
69
+ red: "#ED8796",
70
+ green: "#A6DA95",
71
+ yellow: "#EED49F",
72
+ blue: "#8AADF4",
73
+ magenta: "#C6A0F6",
74
+ cyan: "#8BD5CA",
75
+ white: "#A5ADCB",
76
+ brightBlack: "#363A4F",
77
+ brightRed: "#F5A97F",
78
+ brightGreen: brighten("#A6DA95", 0.15),
79
+ brightYellow: brighten("#EED49F", 0.15),
80
+ brightBlue: brighten("#8AADF4", 0.15),
81
+ brightMagenta: "#F5BDE6",
82
+ brightCyan: brighten("#8BD5CA", 0.15),
83
+ brightWhite: "#CAD3F5",
84
+ foreground: "#CAD3F5",
85
+ background: "#24273A",
86
+ cursorColor: "#CAD3F5",
87
+ cursorText: "#24273A",
88
+ selectionBackground: "#6E738D",
89
+ selectionForeground: "#CAD3F5",
90
+ }
91
+
92
+ /** Catppuccin Latte — the light variant. */
93
+ export const catppuccinLatte: ColorPalette = {
94
+ name: "catppuccin-latte",
95
+ dark: false,
96
+ black: "#DCE0E8",
97
+ red: "#D20F39",
98
+ green: "#40A02B",
99
+ yellow: "#DF8E1D",
100
+ blue: "#1E66F5",
101
+ magenta: "#8839EF",
102
+ cyan: "#179299",
103
+ white: "#6C6F85",
104
+ brightBlack: "#CCD0DA",
105
+ brightRed: "#FE640B",
106
+ brightGreen: brighten("#40A02B", 0.15),
107
+ brightYellow: brighten("#DF8E1D", 0.15),
108
+ brightBlue: brighten("#1E66F5", 0.15),
109
+ brightMagenta: "#EA76CB",
110
+ brightCyan: brighten("#179299", 0.15),
111
+ brightWhite: "#4C4F69",
112
+ foreground: "#4C4F69",
113
+ background: "#EFF1F5",
114
+ cursorColor: "#4C4F69",
115
+ cursorText: "#EFF1F5",
116
+ selectionBackground: "#9CA0B0",
117
+ selectionForeground: "#4C4F69",
118
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Dracula palette — dark theme with vibrant accents.
3
+ */
4
+
5
+ import type { ColorPalette } from "../types"
6
+ import { brighten } from "../color"
7
+
8
+ /** Dracula — vibrant dark theme. */
9
+ export const dracula: ColorPalette = {
10
+ name: "dracula",
11
+ dark: true,
12
+ black: "#21222C",
13
+ red: "#FF5555",
14
+ green: "#50FA7B",
15
+ yellow: "#F1FA8C",
16
+ blue: "#BD93F9",
17
+ magenta: "#BD93F9",
18
+ cyan: "#8BE9FD",
19
+ white: "#6272A4",
20
+ brightBlack: "#44475A",
21
+ brightRed: "#FFB86C",
22
+ brightGreen: brighten("#50FA7B", 0.15),
23
+ brightYellow: brighten("#F1FA8C", 0.15),
24
+ brightBlue: brighten("#BD93F9", 0.15),
25
+ brightMagenta: "#FF79C6",
26
+ brightCyan: brighten("#8BE9FD", 0.15),
27
+ brightWhite: "#F8F8F2",
28
+ foreground: "#F8F8F2",
29
+ background: "#282A36",
30
+ cursorColor: "#F8F8F2",
31
+ cursorText: "#282A36",
32
+ selectionBackground: "#6272A4",
33
+ selectionForeground: "#F8F8F2",
34
+ }
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Edge palettes — clean, modern theme by sainnhe.
3
+ * Source: https://github.com/sainnhe/edge (default style)
4
+ */
5
+
6
+ import type { ColorPalette } from "../types"
7
+ import { brighten } from "../color"
8
+
9
+ /** Edge Dark — clean dark variant with balanced accents. */
10
+ export const edgeDark: ColorPalette = {
11
+ name: "edge-dark",
12
+ dark: true,
13
+ black: "#202023",
14
+ red: "#EC7279",
15
+ green: "#A0C980",
16
+ yellow: "#DEB974",
17
+ blue: "#6CB6EB",
18
+ magenta: "#D38AEA",
19
+ cyan: "#5DBBC1",
20
+ white: "#758094",
21
+ brightBlack: "#33353F",
22
+ brightRed: "#DEB974",
23
+ brightGreen: brighten("#A0C980", 0.15),
24
+ brightYellow: brighten("#DEB974", 0.15),
25
+ brightBlue: brighten("#6CB6EB", 0.15),
26
+ brightMagenta: "#EC7279",
27
+ brightCyan: brighten("#5DBBC1", 0.15),
28
+ brightWhite: "#C5CDD9",
29
+ foreground: "#C5CDD9",
30
+ background: "#2C2E34",
31
+ cursorColor: "#C5CDD9",
32
+ cursorText: "#2C2E34",
33
+ selectionBackground: "#414550",
34
+ selectionForeground: "#C5CDD9",
35
+ }
36
+
37
+ /** Edge Light — clean, readable light variant. */
38
+ export const edgeLight: ColorPalette = {
39
+ name: "edge-light",
40
+ dark: false,
41
+ black: "#DDE2E7",
42
+ red: "#D05858",
43
+ green: "#608E32",
44
+ yellow: "#BE7E05",
45
+ blue: "#5079BE",
46
+ magenta: "#B05CCC",
47
+ cyan: "#3A8B84",
48
+ white: "#8790A0",
49
+ brightBlack: "#EEF1F4",
50
+ brightRed: "#BE7E05",
51
+ brightGreen: brighten("#608E32", 0.15),
52
+ brightYellow: brighten("#BE7E05", 0.15),
53
+ brightBlue: brighten("#5079BE", 0.15),
54
+ brightMagenta: "#D05858",
55
+ brightCyan: brighten("#3A8B84", 0.15),
56
+ brightWhite: "#4B505B",
57
+ foreground: "#4B505B",
58
+ background: "#FAFAFA",
59
+ cursorColor: "#4B505B",
60
+ cursorText: "#FAFAFA",
61
+ selectionBackground: "#DDE2E7",
62
+ selectionForeground: "#4B505B",
63
+ }
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Everforest palettes — a green-toned comfortable color scheme.
3
+ * Source: https://github.com/sainnhe/everforest (medium background variants)
4
+ */
5
+
6
+ import type { ColorPalette } from "../types"
7
+ import { brighten } from "../color"
8
+
9
+ /** Everforest Dark — warm green-based dark theme (medium background). */
10
+ export const everforestDark: ColorPalette = {
11
+ name: "everforest-dark",
12
+ dark: true,
13
+ black: "#232a2e", // bg_dim
14
+ red: "#e67e80",
15
+ green: "#a7c080",
16
+ yellow: "#dbbc7f",
17
+ blue: "#7fbbb3",
18
+ magenta: "#d699b6",
19
+ cyan: "#83c092", // aqua
20
+ white: "#859289", // grey1
21
+ brightBlack: "#343f44", // bg1
22
+ brightRed: "#e69875",
23
+ brightGreen: brighten("#a7c080", 0.15),
24
+ brightYellow: brighten("#dbbc7f", 0.15),
25
+ brightBlue: brighten("#7fbbb3", 0.15),
26
+ brightMagenta: "#e67e80", // everforest has no distinct pink; reuse red
27
+ brightCyan: brighten("#83c092", 0.15),
28
+ brightWhite: "#d3c6aa", // fg
29
+ foreground: "#d3c6aa", // fg
30
+ background: "#2d353b", // bg0
31
+ cursorColor: "#d3c6aa", // fg
32
+ cursorText: "#2d353b", // bg0
33
+ selectionBackground: "#4f585e", // bg4
34
+ selectionForeground: "#d3c6aa", // fg
35
+ }
36
+
37
+ /** Everforest Light — warm green-based light theme (medium background). */
38
+ export const everforestLight: ColorPalette = {
39
+ name: "everforest-light",
40
+ dark: false,
41
+ black: "#efebd4", // bg_dim
42
+ red: "#f85552",
43
+ green: "#8da101",
44
+ yellow: "#dfa000",
45
+ blue: "#3a94c5",
46
+ magenta: "#df69ba",
47
+ cyan: "#35a77c", // aqua
48
+ white: "#939f91", // grey1
49
+ brightBlack: "#f4f0d9", // bg1
50
+ brightRed: "#f57d26",
51
+ brightGreen: brighten("#8da101", 0.15),
52
+ brightYellow: brighten("#dfa000", 0.15),
53
+ brightBlue: brighten("#3a94c5", 0.15),
54
+ brightMagenta: "#f85552", // everforest has no distinct pink; reuse red
55
+ brightCyan: brighten("#35a77c", 0.15),
56
+ brightWhite: "#5c6a72", // fg
57
+ foreground: "#5c6a72", // fg
58
+ background: "#fdf6e3", // bg0
59
+ cursorColor: "#5c6a72", // fg
60
+ cursorText: "#fdf6e3", // bg0
61
+ selectionBackground: "#e0dcc7", // bg4
62
+ selectionForeground: "#5c6a72", // fg
63
+ }
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Gruvbox palettes — retro groove color scheme.
3
+ */
4
+
5
+ import type { ColorPalette } from "../types"
6
+ import { brighten } from "../color"
7
+
8
+ /** Gruvbox Dark — warm retro dark theme. */
9
+ export const gruvboxDark: ColorPalette = {
10
+ name: "gruvbox-dark",
11
+ dark: true,
12
+ black: "#1D2021",
13
+ red: "#FB4934",
14
+ green: "#B8BB26",
15
+ yellow: "#FABD2F",
16
+ blue: "#83A598",
17
+ magenta: "#D3869B",
18
+ cyan: "#8EC07C",
19
+ white: "#BDAE93",
20
+ brightBlack: "#3C3836",
21
+ brightRed: "#FE8019",
22
+ brightGreen: brighten("#B8BB26", 0.15),
23
+ brightYellow: brighten("#FABD2F", 0.15),
24
+ brightBlue: brighten("#83A598", 0.15),
25
+ brightMagenta: "#D3869B",
26
+ brightCyan: brighten("#8EC07C", 0.15),
27
+ brightWhite: "#EBDBB2",
28
+ foreground: "#EBDBB2",
29
+ background: "#282828",
30
+ cursorColor: "#EBDBB2",
31
+ cursorText: "#282828",
32
+ selectionBackground: "#665C54",
33
+ selectionForeground: "#EBDBB2",
34
+ }
35
+
36
+ /** Gruvbox Light — warm retro light theme. */
37
+ export const gruvboxLight: ColorPalette = {
38
+ name: "gruvbox-light",
39
+ dark: false,
40
+ black: "#F9F5D7",
41
+ red: "#CC241D",
42
+ green: "#98971A",
43
+ yellow: "#D79921",
44
+ blue: "#458588",
45
+ magenta: "#B16286",
46
+ cyan: "#689D6A",
47
+ white: "#665C54",
48
+ brightBlack: "#EBDBB2",
49
+ brightRed: "#D65D0E",
50
+ brightGreen: brighten("#98971A", 0.15),
51
+ brightYellow: brighten("#D79921", 0.15),
52
+ brightBlue: brighten("#458588", 0.15),
53
+ brightMagenta: "#B16286",
54
+ brightCyan: brighten("#689D6A", 0.15),
55
+ brightWhite: "#3C3836",
56
+ foreground: "#3C3836",
57
+ background: "#FBF1C7",
58
+ cursorColor: "#3C3836",
59
+ cursorText: "#FBF1C7",
60
+ selectionBackground: "#A89984",
61
+ selectionForeground: "#3C3836",
62
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Horizon palette — beautifully warm theme.
3
+ * Source: https://github.com/jolaleye/horizon-theme-vscode
4
+ */
5
+
6
+ import type { ColorPalette } from "../types"
7
+ import { brighten } from "../color"
8
+
9
+ /** Horizon — warm dark variant with vivid accents. */
10
+ export const horizon: ColorPalette = {
11
+ name: "horizon",
12
+ dark: true,
13
+ black: "#16161C",
14
+ red: "#E95678",
15
+ green: "#29D398",
16
+ yellow: "#FAC29A",
17
+ blue: "#26BBD9",
18
+ magenta: "#B877DB",
19
+ cyan: "#59E1E3",
20
+ white: "#6C6F93",
21
+ brightBlack: "#232530",
22
+ brightRed: "#FAB795",
23
+ brightGreen: brighten("#29D398", 0.15),
24
+ brightYellow: brighten("#FAC29A", 0.15),
25
+ brightBlue: brighten("#26BBD9", 0.15),
26
+ brightMagenta: "#EE64AC",
27
+ brightCyan: brighten("#59E1E3", 0.15),
28
+ brightWhite: "#D5D8DA",
29
+ foreground: "#D5D8DA",
30
+ background: "#1C1E26",
31
+ cursorColor: "#D5D8DA",
32
+ cursorText: "#1C1E26",
33
+ selectionBackground: "#2E303E",
34
+ selectionForeground: "#D5D8DA",
35
+ }