feat: add user-defined color palette (#4209)

* docs(config): add color palette to docs

* feat: add user-defined color palette

* fix: update config schema

* refactor: apply suggestions from code review

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

* fix: update new test

* feat: add support for multiple palettes

* docs(config): update docs for multiple color palettes

* docs(config): fix formatting

* test: test overriding a predefined color with itself

* docs: mention palettes cannot reference themselves

* refactor: warn when using a nonexistent palette

* test: test retrieving a nonexistent color palette

* fix: fix issues with palette log messages

* fix: update config schema

* fix: skip serializing palette if none

* refactor: change nonexistent palette message to warning

* fix: update config schema

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
This commit is contained in:
Anomalocaridid
2022-09-27 17:08:52 -04:00
committed by GitHub
parent f9947d9f14
commit d93074d056
6 changed files with 169 additions and 15 deletions
+16
View File
@@ -1544,6 +1544,22 @@
"add_newline": {
"default": true,
"type": "boolean"
},
"palette": {
"type": [
"string",
"null"
]
},
"palettes": {
"default": {},
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"additionalProperties": false,