Last active
January 10, 2023 03:15
-
-
Save tig/1fcbaf1bf454df6a7ba4331503724b15 to your computer and use it in GitHub Desktop.
VisualStyle schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"ColorSchemes": { | |
"description": "A list of ColorSchemes. Each ColorScheme specifies a set of Attributes (Foreground & Background).", | |
"type": "object", | |
"additionalProperties": { | |
"$ref": "#/definitions/ColorScheme" | |
} | |
} | |
}, | |
"required": [ | |
"ColorSchemes" | |
], | |
"definitions": { | |
"ColorScheme": { | |
"description": "A Terminal.Gui ColorScheme. Specifies the Foreground & Background colors for modes of an Terminal.Gui app.", | |
"type": "object", | |
"properties": { | |
"Normal": { | |
"description": "The foreground and background color for text when the view is not focused, hot, or disabled.", | |
"$ref": "#/definitions/Attribute" | |
}, | |
"Focus": { | |
"description": "The foreground and background color for text when the view has focus.", | |
"$ref": "#/definitions/Attribute" | |
}, | |
"HotNormal": { | |
"description": "The foreground and background color for text when the view is highlighted (hot).", | |
"$ref": "#/definitions/Attribute" | |
}, | |
"HotFocus": { | |
"description": "The foreground and background color for text when the view is highlighted (hot) and has focus.", | |
"$ref": "#/definitions/Attribute" | |
}, | |
"Disabled": { | |
"description": "The foreground and background color for text when the view disabled.", | |
"$ref": "#/definitions/Attribute" | |
} | |
} | |
}, | |
"Attribute": { | |
"description": "A Terminal.Gui color attribute. Specifies the Foreground & Background colors for Terminal.Gui output.", | |
"type": "object", | |
"properties": { | |
"Foreground": { | |
"description": "A foreground color.", | |
"$ref": "#/definitions/Color" | |
}, | |
"Background": { | |
"description": "The boreground color.", | |
"$ref": "#/definitions/Color" | |
} | |
}, | |
"required": [ | |
"Foreground", | |
"Background" | |
] | |
}, | |
"Color": { | |
"description": "One be either one of 16 standard color names or an rgb(r,g,b) tuple.", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "string", | |
"properties": { | |
"color": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"enum": [ "Black", "Blue", "Green", "Cyan", "Red", "Magenta", "Brown", "Gray", "DarkGray", "BrightBlue", "BrightGreen", "BrightCyan", "BrightRed", "BrightMagenta", "BrightYellow", "White" ] | |
}, | |
{ | |
"type": "string", | |
"pattern": "^rgb\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*\\)$" | |
} | |
] | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment