Visual Studio Code, how to change background of a specific - visual-studio-code

I want to change the background of a specific scope (code.block) in VSCode as I do with sublime. sublimetext
Block comment has different background, hence it is easier to notice.
Although I made necessary modifications to relevant json file, and foreground colors displayed correctly, backgroundcolor is always overriden by the background of editor. the background field (ff0000 marked with red) changes correctly but the displayed background field (1d1a18 marked with green) is the background of the editor.
VSCode
I use meterial dark soda theme.
Anyone knows how to disable this setting.

You can't. Here's the issue tracking: #3429.

Related

ghost statament color in Dafny on Visual Code

Could I configure the color (grey, by default) of Ghost Statements in Dafny. I mean, the current gray color is too dark, it is difficult to see the text in the classroom screen. I think a lighter gray would be better.
There are two options to fix this.
Don't use markGhostStatements. By default dafny.markGhostStatements is set to be true. Change extension setting to false.
Use markGhostStatements, but change background color. There is no configuration to set it. Probably file an issue at https://github.com/dafny-lang/ide-vscode to provide that configuration. You can locally build ide-vscode by setting this option. See images below for change in background color by setting GhostDecoration.

VS Code Sidebar Foreground Color Dimmed (Using FireFly Pro Midnight)

The foreground color of some text in my VS Code sidebar is randomly darkened out. Often, these files are files I am actively working with, and it's very difficult to navigate.
I am currently using FireFly Pro Midnight, and the only customization I have is a change to the foreground color to brighten it. The issue occurs whether I change the foreground color or not.
Does anyone know of a good way to change this coloring or the reason it is dimming out certain file names?
Darkened Text
My Only Customization
This might not be your solution, but here's what worked for me. I had the Git color status activated in my sidebar, so the title of modified files were displayed as dark blue, untracked files as dark green, and ignored files (listed in .gitignore) as almost grayish-transparent.
The ignored files were the one causing the problem, so here's the fix using theme color customization.
Go to Preferences > Open Settings (JSON), then add this custom block:
"workbench.colorCustomizations": {
"gitDecoration.ignoredResourceForeground": "#949494" // dark gray, but not faded
}

How to theme the reference popup window in the VS Code editor

I'm creating a custom colour theme extension for Visual Studio Code and I can't find out how to customise the colours for certain parts of the user interface. The theme is complete, apart from customising the reference popup window.
Here is the popup window I'm trying to customise:
I wish to change the blue background and if possible, the blue border lines. I'm sure this can be done because some of the built-in themes do so. Does anyone have an idea what I would need to put into the colour theme file to achieve this?
I'm also looking for pointers to customise the status bar colour (at the base of the editor).
As far as I know, this is not possible.
Some of the built-in themes are build differently. Most themes are textmate style themes, but you can see here that some of the built-in themes are .json files and are somehow handled differently.
You can find the theme documentation here. Specifically, this part is relevant:
Besides the TextMate language grammar standard scopes, VS Code also
has custom theme settings which you can use to tune your own theme:
rangeHighlight: Background color of range highlighted, like by Quick open and Find features.
selectionHighlight: Background color of regions highlighted while selecting.
inactiveSelection: Background color of selections when not in focus.
wordHighlight: Background color of a symbol during read-access, like reading a variable.
wordHighlightStrong: Background color of a symbol during write-access, like writing to a variable.
findMatchHighlight: Background color of regions matching the search.
currentFindMatchHighlight: Background color of the current region matching the search.
findRangeHighlight: Background color of regions selected for search.
linkForeground: Color of links.
activeLinkForeground: Color of active links.
hoverHighlight: Background color when hovered.
referenceHighlight: Background color of a reference when finding all references.
guide: Color of the guides displayed to indicate nesting levels.
You can find an example VS Code theme here which includes the custom
settings.
As we can see here, there is no special override for the references pane.
We can, though, see in the code that the dark blue for dark themes and the light blue for light themes that you're seeing in the references pane is a default value set in code here.
The colours for the UI itself are stored in the following file (ubuntu): /usr/share/code/resources/app/out/vs/workbench/electron-browser/workbench.main.css
You can edit that, or wait for March 2017 where a new version will be released which will allow customising these colours more easily.
Revisiting this in Sept/2022 out of necessity, I confirmed VS Code 1.70 has native support for manipulating colors for the Go to References/Definitions and Peek... overlays.
Change the overlay background and border as follows, but there's lots of other settings too; see peekView*
"workbench.colorCustomizations": {
"peekViewEditor.background": "#01041a",
"peekViewResult.background": "#054c8a",
"peekView.border": "#04fafa"

Netbeans: How to change error row highlighting color away from red

I've dug through every damn color setting under Tools> Options. Went through every Fonts & Color, Editor, PHP etc and I'll be damned if I can figure out how to change the background row highlighting for when you have an error. I've been able to change ever other color to fit my personal preference cept this one. Here's a screen shot of the problem:
I would like to change the background red to a dark red so the text is easier to ready.
Using Netbeans 7.4
Thank you for your time and consideration.
Edit: Per Ben's point, here's the current options and the code behind the panel to show it's not working:
Final update, here's the end result which is close enough:
By looking at your screenshots (correct me if I am wrong) I can see that you have set your current row highlighting to red:
Tools-> Options-> Fonts&Colors-> Highlighting(Tab)-> Highlight Caret Row
As far as I know you can't set different background highlighting options for errors. So what you can do is set the formatting options for errors:
Font: No need to explain this.
Foreground: This is the text color if you change this it will disregard all other formatting options that you may have set, so lets leave it as is.
Background: This is what you want to change so that text don't get lost in the formatting. If you scroll to the bottom you can also set custom colors.
Effects: Irrelevant
Effect Color: Disabled if effects is None and only applies to the effect.
As you can see I set mine to yellow just as an example.
As you can see in this screen shot my background highlighting is light grey as well as my string formatting. So it is impossible to read, but by changing the error formatting this is the result:
Alternatively you can just select another background highlighting color that suits your formatting better.
Try Fonts&Colors->Syntax->Error
You can also try setting the Annotations color for "Error", mine was set to a specific color (after importing a theme) instead of 'Inherited', making text unreadable in a similar way.
This was really annoying for me too and most answers didn't help. I think that I have figured it out.
In netbeans 12 you need to change two things.
Tools->Options->Fonts&Colors->Syntax->Java->Error->change background color. This will only change the background of the code in error and not the red background of the rest of the lines white space.
To fix the red on the whitespace.
Tools->Options->Fonts&Colors->Annotations->Error(the one with the exclamation point)->change background color
I selected inherited to have no whitespace highlighting.
enter image description here

How to change a background color in the NetBeans completion popup window?

I have a black background of the code editor but a popup window with code completion has a white color with highlighted text.
How to change a background color or disable the highlighting?
It appears that the colors of the pop-up code completion and Javadoc windows are not directly configurable from within Netbeans.
It appears that the only way to accomplish this is to change the color scheme of your operating system's desktop to have black-backgrounded windows. (That means, of course, that all of your apps will have a black background.) This was tested and confirmed in Netbeans 7.3 development build 201212140001. Using Netbeans 7.2.1 there were some issues with this. Notably that the black background was present, but the text of the code completion and Javadoc windows were too dark. This was reported as part of and fixed in Bug 134281 for 7.3.
I would suggest that if you would like the code completion and Javadoc pop-up windows to match the editor color theme without having to change the OS color theme, that you see if someone has already submitted a similar request on Netbeans's "Issues = Bugs, Feature Requests, and Enhancements" page. If so, vote for it. If not, submit one yourself. Be sure to differentiate it from #134281 which dealt with accessibility and OS color themes.