forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdesktop-theme.schema.json
More file actions
161 lines (161 loc) · 5.62 KB
/
desktop-theme.schema.json
File metadata and controls
161 lines (161 loc) · 5.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://opencode.ai/desktop-theme.json",
"title": "OpenCode Desktop Theme",
"description": "A theme definition for the OpenCode desktop application",
"type": "object",
"required": ["name", "id", "light", "dark"],
"properties": {
"$schema": {
"type": "string",
"description": "JSON Schema reference"
},
"name": {
"type": "string",
"description": "Human-readable theme name"
},
"id": {
"type": "string",
"description": "Unique theme identifier (slug)",
"pattern": "^[a-z0-9-]+$"
},
"light": {
"$ref": "#/definitions/ThemeVariant",
"description": "Light mode color variant"
},
"dark": {
"$ref": "#/definitions/ThemeVariant",
"description": "Dark mode color variant"
}
},
"definitions": {
"HexColor": {
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
"description": "A hex color value like #fff, #ffff, #ffffff, or #ffffffff"
},
"ColorValue": {
"type": "string",
"pattern": "^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|var\\(--[a-z0-9-]+\\))$",
"description": "Either a hex color value (#rgb/#rgba/#rrggbb/#rrggbbaa) or a CSS variable reference"
},
"ThemeSeedColors": {
"type": "object",
"description": "The legacy semantic seed set used to generate a theme",
"additionalProperties": false,
"required": ["neutral", "primary", "success", "warning", "error", "info", "interactive", "diffAdd", "diffDelete"],
"properties": {
"neutral": {
"$ref": "#/definitions/HexColor",
"description": "Base neutral color for generating the gray scale"
},
"primary": {
"$ref": "#/definitions/HexColor",
"description": "Primary brand/accent color"
},
"success": {
"$ref": "#/definitions/HexColor",
"description": "Success state color (typically green)"
},
"warning": {
"$ref": "#/definitions/HexColor",
"description": "Warning state color (typically yellow/orange)"
},
"error": {
"$ref": "#/definitions/HexColor",
"description": "Error/critical state color (typically red)"
},
"info": {
"$ref": "#/definitions/HexColor",
"description": "Informational state color (typically purple/blue)"
},
"interactive": {
"$ref": "#/definitions/HexColor",
"description": "Interactive element color (links, buttons)"
},
"diffAdd": {
"$ref": "#/definitions/HexColor",
"description": "Color for diff additions"
},
"diffDelete": {
"$ref": "#/definitions/HexColor",
"description": "Color for diff deletions"
}
}
},
"ThemePaletteColors": {
"type": "object",
"description": "A compact semantic palette used to derive the full theme programmatically",
"additionalProperties": false,
"required": ["neutral", "ink", "primary", "success", "warning", "error", "info"],
"properties": {
"neutral": {
"$ref": "#/definitions/HexColor",
"description": "Base neutral color for generating the gray scale"
},
"ink": {
"$ref": "#/definitions/HexColor",
"description": "Foreground or chrome color used to derive text and border tones"
},
"primary": {
"$ref": "#/definitions/HexColor",
"description": "Primary brand color used for brand surfaces and strong emphasis"
},
"success": {
"$ref": "#/definitions/HexColor",
"description": "Success state color"
},
"warning": {
"$ref": "#/definitions/HexColor",
"description": "Warning state color"
},
"error": {
"$ref": "#/definitions/HexColor",
"description": "Error or critical state color"
},
"info": {
"$ref": "#/definitions/HexColor",
"description": "Informational state color"
},
"accent": {
"$ref": "#/definitions/HexColor",
"description": "Optional extra expressive accent for syntax and rich content"
},
"interactive": {
"$ref": "#/definitions/HexColor",
"description": "Optional dedicated interactive color; falls back to primary"
},
"diffAdd": {
"$ref": "#/definitions/HexColor",
"description": "Optional diff-add seed; falls back to a softened success color"
},
"diffDelete": {
"$ref": "#/definitions/HexColor",
"description": "Optional diff-delete seed; falls back to error"
}
}
},
"ThemeVariant": {
"type": "object",
"description": "A theme variant (light or dark) with either a compact palette or legacy seeds and optional overrides",
"oneOf": [{ "required": ["seeds"] }, { "required": ["palette"] }],
"properties": {
"seeds": {
"$ref": "#/definitions/ThemeSeedColors",
"description": "Legacy seed colors used to generate the full palette"
},
"palette": {
"$ref": "#/definitions/ThemePaletteColors",
"description": "Compact palette used to derive the full token set"
},
"overrides": {
"type": "object",
"description": "Optional direct overrides for any CSS variable (without -- prefix)",
"additionalProperties": {
"$ref": "#/definitions/ColorValue"
}
}
}
}
}
}