themes.md

 1# Themes
 2
 3The `themes` directory in an extension should contain one or more theme files.
 4
 5Each theme file should adhere to the JSON schema specified at [`https://zed.dev/schema/themes/v0.2.0.json`](https://zed.dev/schema/themes/v0.2.0.json).
 6
 7See [this blog post](https://zed.dev/blog/user-themes-now-in-preview) for more details about creating themes.
 8
 9## Theme JSON Structure
10
11The structure of a Zed theme is defined in the [Zed Theme JSON Schema](https://zed.dev/schema/themes/v0.2.0.json).
12
13A Zed theme consists of a Theme Family object including:
14
15- `name`: The name for the theme family
16- `author`: The name of the author of the theme family
17- `themes`: An array of Themes belonging to the theme family
18
19The core components a Theme object include:
20
211. Theme Metadata:
22   - `name`: The name of the theme
23   - `appearance`: Either "light" or "dark"
24
252. Style Properties under the `style`, such as:
26   - `background`: The main background color
27   - `foreground`: The main text color
28   - `accent`: The accent color used for highlighting and emphasis
29
303. Syntax Highlighting:
31   - `syntax`: An object containing color definitions for various syntax elements (e.g., keywords, strings, comments)
32
334. UI Elements:
34   - Colors for various UI components such as:
35     - `element.background`: Background color for UI elements
36     - `border`: Border colors for different states (normal, focused, selected)
37     - `text`: Text colors for different states (normal, muted, accent)
38
395. Editor-specific Colors:
40   - Colors for editor-related elements such as:
41     - `editor.background`: Editor background color
42     - `editor.gutter`: Gutter colors
43     - `editor.line_number`: Line number colors
44
456. Terminal Colors:
46   - ANSI color definitions for the integrated terminal
47
48We recommend looking at our [existing themes](https://github.com/zed-industries/zed/tree/main/assets/themes) to get a more comprehensive idea of what can be styled.