Right now, it is a faint blueish, which is hard to see with my current settings. I tried searching for it manually in the JSON file but nothing so far. Is there any way to change the default color?
You can modify the code folding color in Visual Studio Code by customizing your theme’s settings. Follow these steps:
Access User Settings:
Open Visual Studio Code.
Go to File > Preferences > Settings (or use the shortcut Ctrl+, or Cmd+, on Mac).
Open Settings JSON:
Click on the {} icon in the top right corner of the Settings tab to open the settings.json file.
Add Customization:
In the settings.json file, add or modify the following settings to change the code folding color. Here’s an example of how you might do this:
"editor.foldBackground": "#YourDesiredColor"
Replace #YourDesiredColor with the HEX code or color name of your preferred color. For instance, "#FF0000" would set the color to red.
Save Changes:
Save the settings.json file by either using Ctrl+S (Windows/Linux) or Cmd+S (Mac).
Review Changes:
Close and reopen any open editor windows in VS Code to apply the changes.
This modification should change the color used for code folding in your Visual Studio Code editor according to your preferences. If the color doesn’t update immediately, try restarting Visual Studio Code for the changes to take effect.
2
Answers
If you mean the background of the folded up code line, you can set
editor.foldBackground
like so:In the above sample code, I made it a bright red:
Alternatively, if you want to limit it to a specific theme, you can do the following:
You can modify the code folding color in Visual Studio Code by customizing your theme’s settings. Follow these steps:
Access User Settings:
File
>Preferences
>Settings
(or use the shortcutCtrl+,
orCmd+,
on Mac).Open Settings JSON:
{}
icon in the top right corner of the Settings tab to open thesettings.json
file.Add Customization:
settings.json
file, add or modify the following settings to change the code folding color. Here’s an example of how you might do this:Replace
#YourDesiredColor
with the HEX code or color name of your preferred color. For instance,"#FF0000"
would set the color to red.Save Changes:
settings.json
file by either usingCtrl+S
(Windows/Linux) orCmd+S
(Mac).Review Changes:
This modification should change the color used for code folding in your Visual Studio Code editor according to your preferences. If the color doesn’t update immediately, try restarting Visual Studio Code for the changes to take effect.