Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set background color on Visual Studio Code Markdown Preview

I'm currently using the default Dark+ color theme on Visual Studio Code and the markdown preview is using the same style (black background color and white text).

How can I change to a light theme just for the markdown preview, like dark text and white background? I've tried writing something like "markdown.preview.background": "#FFFFFF" in the settings.json file without success.

Thanks

like image 990
crash Avatar asked Mar 15 '19 10:03

crash


People also ask

Can you preview markdown in VS Code?

VS Code supports Markdown files out of the box. You just start writing Markdown text, save the file with the . md extension and then you can toggle the visualization of the editor between the code and the preview of the Markdown file; obviously, you can also open an existing Markdown file and start working with it.

How do I change the background color in Visual Studio code 2019?

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.

How do I Preview markdown in Visual Studio?

Open Preview (Ctrl+Shift+V) or Open Preview to the Side command (Ctrl+K V).


1 Answers

A simple way to achieve this other than creating your own stylesheet for each project, is by installing the Markdown Preview Enhanced extension. The default markdown theme for the extension is white, but you can also choose a different them by setting the "markdown-preview-enhanced.previewTheme" in settings.json

"markdown-preview-enhanced.previewTheme": "medium.css" 

A full list of available themes will be displayed as you start typing in the json value.

like image 96
paddyfields Avatar answered Sep 19 '22 23:09

paddyfields