summaryrefslogtreecommitdiffhomepage
path: root/packages/console/app/public/theme.json
blob: b3e97f7ca89743e2f89071a49535fae45910033a (plain)
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "description": "JSON schema reference for configuration validation"
    },
    "defs": {
      "type": "object",
      "description": "Color definitions that can be referenced in the theme",
      "patternProperties": {
        "^[a-zA-Z][a-zA-Z0-9_]*$": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^#[0-9a-fA-F]{6}$",
              "description": "Hex color value"
            },
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 255,
              "description": "ANSI color code (0-255)"
            },
            {
              "type": "string",
              "enum": ["none"],
              "description": "No color (uses terminal default)"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "theme": {
      "type": "object",
      "description": "Theme color definitions",
      "properties": {
        "primary": { "$ref": "#/definitions/colorValue" },
        "secondary": { "$ref": "#/definitions/colorValue" },
        "accent": { "$ref": "#/definitions/colorValue" },
        "error": { "$ref": "#/definitions/colorValue" },
        "warning": { "$ref": "#/definitions/colorValue" },
        "success": { "$ref": "#/definitions/colorValue" },
        "info": { "$ref": "#/definitions/colorValue" },
        "text": { "$ref": "#/definitions/colorValue" },
        "textMuted": { "$ref": "#/definitions/colorValue" },
        "background": { "$ref": "#/definitions/colorValue" },
        "backgroundPanel": { "$ref": "#/definitions/colorValue" },
        "backgroundElement": { "$ref": "#/definitions/colorValue" },
        "border": { "$ref": "#/definitions/colorValue" },
        "borderActive": { "$ref": "#/definitions/colorValue" },
        "borderSubtle": { "$ref": "#/definitions/colorValue" },
        "diffAdded": { "$ref": "#/definitions/colorValue" },
        "diffRemoved": { "$ref": "#/definitions/colorValue" },
        "diffContext": { "$ref": "#/definitions/colorValue" },
        "diffHunkHeader": { "$ref": "#/definitions/colorValue" },
        "diffHighlightAdded": { "$ref": "#/definitions/colorValue" },
        "diffHighlightRemoved": { "$ref": "#/definitions/colorValue" },
        "diffAddedBg": { "$ref": "#/definitions/colorValue" },
        "diffRemovedBg": { "$ref": "#/definitions/colorValue" },
        "diffContextBg": { "$ref": "#/definitions/colorValue" },
        "diffLineNumber": { "$ref": "#/definitions/colorValue" },
        "diffAddedLineNumberBg": { "$ref": "#/definitions/colorValue" },
        "diffRemovedLineNumberBg": { "$ref": "#/definitions/colorValue" },
        "markdownText": { "$ref": "#/definitions/colorValue" },
        "markdownHeading": { "$ref": "#/definitions/colorValue" },
        "markdownLink": { "$ref": "#/definitions/colorValue" },
        "markdownLinkText": { "$ref": "#/definitions/colorValue" },
        "markdownCode": { "$ref": "#/definitions/colorValue" },
        "markdownBlockQuote": { "$ref": "#/definitions/colorValue" },
        "markdownEmph": { "$ref": "#/definitions/colorValue" },
        "markdownStrong": { "$ref": "#/definitions/colorValue" },
        "markdownHorizontalRule": { "$ref": "#/definitions/colorValue" },
        "markdownListItem": { "$ref": "#/definitions/colorValue" },
        "markdownListEnumeration": { "$ref": "#/definitions/colorValue" },
        "markdownImage": { "$ref": "#/definitions/colorValue" },
        "markdownImageText": { "$ref": "#/definitions/colorValue" },
        "markdownCodeBlock": { "$ref": "#/definitions/colorValue" },
        "syntaxComment": { "$ref": "#/definitions/colorValue" },
        "syntaxKeyword": { "$ref": "#/definitions/colorValue" },
        "syntaxFunction": { "$ref": "#/definitions/colorValue" },
        "syntaxVariable": { "$ref": "#/definitions/colorValue" },
        "syntaxString": { "$ref": "#/definitions/colorValue" },
        "syntaxNumber": { "$ref": "#/definitions/colorValue" },
        "syntaxType": { "$ref": "#/definitions/colorValue" },
        "syntaxOperator": { "$ref": "#/definitions/colorValue" },
        "syntaxPunctuation": { "$ref": "#/definitions/colorValue" }
      },
      "required": ["primary", "secondary", "accent", "text", "textMuted", "background"],
      "additionalProperties": false
    }
  },
  "required": ["theme"],
  "additionalProperties": false,
  "definitions": {
    "colorValue": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^#[0-9a-fA-F]{6}$",
          "description": "Hex color value (same for dark and light)"
        },
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 255,
          "description": "ANSI color code (0-255, same for dark and light)"
        },
        {
          "type": "string",
          "enum": ["none"],
          "description": "No color (uses terminal default)"
        },
        {
          "type": "string",
          "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$",
          "description": "Reference to another color in the theme or defs"
        },
        {
          "type": "object",
          "properties": {
            "dark": {
              "oneOf": [
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$",
                  "description": "Hex color value for dark mode"
                },
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 255,
                  "description": "ANSI color code for dark mode"
                },
                {
                  "type": "string",
                  "enum": ["none"],
                  "description": "No color (uses terminal default)"
                },
                {
                  "type": "string",
                  "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$",
                  "description": "Reference to another color for dark mode"
                }
              ]
            },
            "light": {
              "oneOf": [
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$",
                  "description": "Hex color value for light mode"
                },
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 255,
                  "description": "ANSI color code for light mode"
                },
                {
                  "type": "string",
                  "enum": ["none"],
                  "description": "No color (uses terminal default)"
                },
                {
                  "type": "string",
                  "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$",
                  "description": "Reference to another color for light mode"
                }
              ]
            }
          },
          "required": ["dark", "light"],
          "additionalProperties": false,
          "description": "Separate colors for dark and light modes"
        }
      ]
    }
  }
}