I went through https://code.visualstudio.com/docs/getstarted/theme-color-reference but can't seem to find the setting for changing the comment color.
I am currently using Atom One Dark Theme and just like to lighten the color a little bit so I can read it better.
Press 'Ctrl+shift+P' from the keyboard to open VS Code command palette. Search: 'Inspect Editor Tokens and Scopes' Take the cursor on the text or tag, you want to change the colors.
Windows: Ctrl + K + U. Mac: Command + K + U.
Here's how to change it to a different color theme. On the menu bar, select Tools > Options. In the options list, select Environment > General. In the Color theme list, choose between the default Dark theme, the Blue theme, the Blue (Extra Contrast) theme, and the Light theme.
From 1.15 (July 2017) you can change it from settings.json Ctrl+,
"editor.tokenColorCustomizations": { "comments": "#d4922f" },
From 1.20 (January 2018) you can also do it for each theme separately:
"editor.tokenColorCustomizations": { "[Atom One Dark]": { "comments": "#d4922f" } },
Finding the right scope:
Developer: Inspect TM Scopes editor.action.inspectTMScopes
Selector priority:
https://code.visualstudio.com/blogs/2017/02/08/syntax-highlighting-optimizations#_textmate-themes
Ok, more examples (for js
):
"editor.tokenColorCustomizations": { "textMateRules": [{ "scope": "INSERT_SCOPE_HERE", "settings": { "foreground": "#ff0000" } }] }
comment
punctuation.definition.comment
comment.block.documentation
storage.type.class.jsdoc
entity.name.type.instance.jsdoc
variable.other.jsdoc
1.Go to your settings.
2.Type “editor.tokenColorCustomizations” into the search bar then click on “Edit in settings.json”:
3.By default, “editor.tokenColorCustomizations” is set to “null”. To customize the comment color, you can add:
{ "comments": "[color code]" }
You can type something like this:
> "editor.tokenColorCustomizations": { > "comments": "#e45e91" },
4.Change the color of comments,based on your liking by hovering over the color and choosing your desired color. 5.Then save the changes.(Ctrl+S)
6.Exit the program. open it again, you will see the changes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With