monaco-vscode-textmate-theme-converter
monaco-vscode-textmate-theme-converter copied to clipboard
Handle non hex color value
Trying to convert https://github.com/akamud/vscode-theme-onedark for monaco-editor-textmate and getting Error: Illegal value for token color: because some color values can be:
- css color: "white"
- empty values: ""
- keywords: "inherit", "transparent"
This is a limitation of monaco-editor unfortunately but maybe this package can parse and convert the values in order to provide compatible conversion? https://github.com/microsoft/monaco-editor/issues/1815
Unfortunalely I wouldn't have time to update this, feel free to raise a PR if you wish to add this feature yourself @dmnsgn
Best thing to do is to coerce those colors to #RRGGBB using chroma.js
you can just generate the onedarkpro jsonc file in vscode rather than get it from the repo;
you can do this in vscode: cmd+shift+p and select generate color theme from current settings.
then use this tool transform it