theme.json 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "type": "object",
  4. "properties": {
  5. "$schema": {
  6. "type": "string",
  7. "description": "JSON schema reference for configuration validation"
  8. },
  9. "defs": {
  10. "type": "object",
  11. "description": "Color definitions that can be referenced in the theme",
  12. "patternProperties": {
  13. "^[a-zA-Z][a-zA-Z0-9_]*$": {
  14. "oneOf": [
  15. {
  16. "type": "string",
  17. "pattern": "^#[0-9a-fA-F]{6}$",
  18. "description": "Hex color value"
  19. },
  20. {
  21. "type": "integer",
  22. "minimum": 0,
  23. "maximum": 255,
  24. "description": "ANSI color code (0-255)"
  25. },
  26. {
  27. "type": "string",
  28. "enum": ["none"],
  29. "description": "No color (uses terminal default)"
  30. }
  31. ]
  32. }
  33. },
  34. "additionalProperties": false
  35. },
  36. "theme": {
  37. "type": "object",
  38. "description": "Theme color definitions",
  39. "properties": {
  40. "primary": { "$ref": "#/definitions/colorValue" },
  41. "secondary": { "$ref": "#/definitions/colorValue" },
  42. "accent": { "$ref": "#/definitions/colorValue" },
  43. "error": { "$ref": "#/definitions/colorValue" },
  44. "warning": { "$ref": "#/definitions/colorValue" },
  45. "success": { "$ref": "#/definitions/colorValue" },
  46. "info": { "$ref": "#/definitions/colorValue" },
  47. "text": { "$ref": "#/definitions/colorValue" },
  48. "textMuted": { "$ref": "#/definitions/colorValue" },
  49. "selectedListItemText": { "$ref": "#/definitions/colorValue" },
  50. "background": { "$ref": "#/definitions/colorValue" },
  51. "backgroundPanel": { "$ref": "#/definitions/colorValue" },
  52. "backgroundElement": { "$ref": "#/definitions/colorValue" },
  53. "border": { "$ref": "#/definitions/colorValue" },
  54. "borderActive": { "$ref": "#/definitions/colorValue" },
  55. "borderSubtle": { "$ref": "#/definitions/colorValue" },
  56. "diffAdded": { "$ref": "#/definitions/colorValue" },
  57. "diffRemoved": { "$ref": "#/definitions/colorValue" },
  58. "diffContext": { "$ref": "#/definitions/colorValue" },
  59. "diffHunkHeader": { "$ref": "#/definitions/colorValue" },
  60. "diffHighlightAdded": { "$ref": "#/definitions/colorValue" },
  61. "diffHighlightRemoved": { "$ref": "#/definitions/colorValue" },
  62. "diffAddedBg": { "$ref": "#/definitions/colorValue" },
  63. "diffRemovedBg": { "$ref": "#/definitions/colorValue" },
  64. "diffContextBg": { "$ref": "#/definitions/colorValue" },
  65. "diffLineNumber": { "$ref": "#/definitions/colorValue" },
  66. "diffAddedLineNumberBg": { "$ref": "#/definitions/colorValue" },
  67. "diffRemovedLineNumberBg": { "$ref": "#/definitions/colorValue" },
  68. "markdownText": { "$ref": "#/definitions/colorValue" },
  69. "markdownHeading": { "$ref": "#/definitions/colorValue" },
  70. "markdownLink": { "$ref": "#/definitions/colorValue" },
  71. "markdownLinkText": { "$ref": "#/definitions/colorValue" },
  72. "markdownCode": { "$ref": "#/definitions/colorValue" },
  73. "markdownBlockQuote": { "$ref": "#/definitions/colorValue" },
  74. "markdownEmph": { "$ref": "#/definitions/colorValue" },
  75. "markdownStrong": { "$ref": "#/definitions/colorValue" },
  76. "markdownHorizontalRule": { "$ref": "#/definitions/colorValue" },
  77. "markdownListItem": { "$ref": "#/definitions/colorValue" },
  78. "markdownListEnumeration": { "$ref": "#/definitions/colorValue" },
  79. "markdownImage": { "$ref": "#/definitions/colorValue" },
  80. "markdownImageText": { "$ref": "#/definitions/colorValue" },
  81. "markdownCodeBlock": { "$ref": "#/definitions/colorValue" },
  82. "syntaxComment": { "$ref": "#/definitions/colorValue" },
  83. "syntaxKeyword": { "$ref": "#/definitions/colorValue" },
  84. "syntaxFunction": { "$ref": "#/definitions/colorValue" },
  85. "syntaxVariable": { "$ref": "#/definitions/colorValue" },
  86. "syntaxString": { "$ref": "#/definitions/colorValue" },
  87. "syntaxNumber": { "$ref": "#/definitions/colorValue" },
  88. "syntaxType": { "$ref": "#/definitions/colorValue" },
  89. "syntaxOperator": { "$ref": "#/definitions/colorValue" },
  90. "syntaxPunctuation": { "$ref": "#/definitions/colorValue" }
  91. },
  92. "required": ["primary", "secondary", "accent", "text", "textMuted", "background"],
  93. "additionalProperties": false
  94. }
  95. },
  96. "required": ["theme"],
  97. "additionalProperties": false,
  98. "definitions": {
  99. "colorValue": {
  100. "oneOf": [
  101. {
  102. "type": "string",
  103. "pattern": "^#[0-9a-fA-F]{6}$",
  104. "description": "Hex color value (same for dark and light)"
  105. },
  106. {
  107. "type": "integer",
  108. "minimum": 0,
  109. "maximum": 255,
  110. "description": "ANSI color code (0-255, same for dark and light)"
  111. },
  112. {
  113. "type": "string",
  114. "enum": ["none"],
  115. "description": "No color (uses terminal default)"
  116. },
  117. {
  118. "type": "string",
  119. "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$",
  120. "description": "Reference to another color in the theme or defs"
  121. },
  122. {
  123. "type": "object",
  124. "properties": {
  125. "dark": {
  126. "oneOf": [
  127. {
  128. "type": "string",
  129. "pattern": "^#[0-9a-fA-F]{6}$",
  130. "description": "Hex color value for dark mode"
  131. },
  132. {
  133. "type": "integer",
  134. "minimum": 0,
  135. "maximum": 255,
  136. "description": "ANSI color code for dark mode"
  137. },
  138. {
  139. "type": "string",
  140. "enum": ["none"],
  141. "description": "No color (uses terminal default)"
  142. },
  143. {
  144. "type": "string",
  145. "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$",
  146. "description": "Reference to another color for dark mode"
  147. }
  148. ]
  149. },
  150. "light": {
  151. "oneOf": [
  152. {
  153. "type": "string",
  154. "pattern": "^#[0-9a-fA-F]{6}$",
  155. "description": "Hex color value for light mode"
  156. },
  157. {
  158. "type": "integer",
  159. "minimum": 0,
  160. "maximum": 255,
  161. "description": "ANSI color code for light mode"
  162. },
  163. {
  164. "type": "string",
  165. "enum": ["none"],
  166. "description": "No color (uses terminal default)"
  167. },
  168. {
  169. "type": "string",
  170. "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$",
  171. "description": "Reference to another color for light mode"
  172. }
  173. ]
  174. }
  175. },
  176. "required": ["dark", "light"],
  177. "additionalProperties": false,
  178. "description": "Separate colors for dark and light modes"
  179. }
  180. ]
  181. }
  182. }
  183. }