Saturday, January 9, 2021

Visual Studio Code: DotNet CLI and the Terminal Window for the Color Blind

Visual Studio Code's Terminal window has numerous uses including invoking the DotNet CLI such as the following which creates a new webapi project: 


For those with limited color vision, the above example is unreadable. Visual Studio Code's settings file can be modified to make the Terminal windows readable for people who are color blind. 

The Visual Studio Code settings file, settings.json (see User and Workspace Settings) which, according to the documentation, is found at:

An example settings.json is as follows:


The following settings.json changes all colors to white thus allowing those of us with limited color vision to see the Terminal window (see code demarcated in boldface)

{
    "terminal.integrated.rendererType": "dom",
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "diffEditor.ignoreTrimWhitespace": true, 
    "workbench.colorCustomizations": {
        "terminal.background":"#1D2021",
        "terminal.foreground":"#FFFFFF",
        "terminalCursor.background":"#FFFFFF",
        "terminalCursor.foreground":"#FFFFFF",
        "terminal.ansiBlack":"#FFFFFF",
        "terminal.ansiBlue":"#FFFFFF",
        "terminal.ansiCyan":"#FFFFFF",
        "terminal.ansiGreen":"#FFFFFF",
        "terminal.ansiMagenta":"#FFFFFF",
        "terminal.ansiRed":"#FFFFFF",
        "terminal.ansiWhite":"#FFFFFF",
        "terminal.ansiYellow":"#FFFFFF",
        "terminal.ansiBrightBlack":"#FFFFFF",
        "terminal.ansiBrightBlue":"#FFFFFF",
        "terminal.ansiBrightCyan":"#FFFFFF",
        "terminal.ansiBrightGreen":"#FFFFFF",
        "terminal.ansiBrightMagenta":"#FFFFFF",
        "terminal.ansiBrightRed":"#FFFFFF",
        "terminal.ansiBrightWhite":"#FFFFFF",
        "terminal.ansiBrightYellow":"#FFFFFF"
      }    
}

The above settings set all colors to white safe for the background. This makes Visual Studio Code Terminal window legible:







No comments :

Post a Comment