You don't map colors to CSS classes, instead the mapping is between text tokens (word, string, comment etc.) and colors. You cannot change the token assignment in Monaco, as this is done by the installed tokenizer for a given language.
So, all you can do is to define theme colors for given token types. The monaco-editor playground has an example for that:
monaco.editor.defineTheme('myCustomTheme', {
base: 'vs', // can also be vs-dark or hc-black
inherit: true, // can also be false to completely replace the builtin rules
rules: [
{ token: 'comment', foreground: 'ffa500', fontStyle: 'italic underline' },
{ token: 'comment.js', foreground: '008800', fontStyle: 'bold' },
{ token: 'comment.css', foreground: '0000ff' } // will inherit fontStyle from `comment` above
]
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…