Fixing VSCode Color Bug on Linux

Being a developer, I love VSCode. Due to my tendency to overprepare, I always checklist before beginning any project. Using VSCode for a couple of years now, for Windows that is, was always a smooth sailing.

PS. — I design and game too. So Windows is ❤

Is VSCode a good code editor?

But, I like to make my things a bit more personal. The extensions on VSCode allow so many features that I almost never miss IDEs. The level of customization you can do is also ming blowing. Themes, intellisense, adding compilers, extensions, even font selection… Everything just flows. 👌

Where the Problem began.

Different Color block in blank areas

I thought it might be some random issue so I gave the machine a quick reboot. Yet it was still there.

As soon as I opened the terminal in VSCode, it also had that weird color shifted block/area.

I put my laptop to sleep, got on my phone to make some calls to my developer friends only to find out that they were experiencing the same with no solution.

Same issue with different theme

I decided to go throught the internet and VSCode issue reports myself as it was pretty annoying. Voila! As I woke my laptop from sleep, the VSCode terminal and code preview areas were filled with noise… white noise. No metaphors here. Actual white noise.

Noisy White Pattern with color shifts still happening

Counter checking with Windows

No Issues on Windows.

What I found.

  • Ubuntu 18.04 LTS
  • Pop-OS 19.10 (Nvidia and Intel/AMD)
  • Elementary OS
  • Mint

The different (darker) color blocks are the same color as the background color of the extensions description (highligted in white rectangles).

Notice the color shifts in blocks

Yet it doesn’t replicate it on Windows.

No Shift in Windows.

But, this issue is not present in Material Theme (Default option in extension).

No color shifts.

Why it is happening?

If you find something else being the reason, please do respond to the story with your findings.

The Solution. (VSCode v1.43.x & Later)

  1. In VSCode, open Command Palette (Ctrl+Shift+P) and search for “Configure Runtime Arguments”. Select it and press Enter.
  2. There should already be an entry:
"disable-color-correct-rendering": true

Just remove that entry.

  • If there are any more entries, do remove those.

BOOM! Issue fixed.

Legacy/Older Solutions (Work for versions earlier than 1.43.x)

  1. In VSCode, open Command Palette (Ctrl+Shift+P) and search for “Configure Runtime Arguments”. Select it and press Enter.
  2. There should already be an entry:
"disable-color-correct-rendering": true

Add a comma (,) after this entry. Even if there is no entry, just put a code block ({}) and follow along.

3. Paste in

"disable-hardware-acceleration": true,

(in the next line, if there is already an entry) inside the same code block.

4. Save the file. Restart VSCode

BOOM! Issue fixed.

Link to original solution.

Still Not Fixed?

  1. Open Command Palette (Ctrl+Shift+P) and search for “Configure Runtime Arguments” and press Enter.
  2. Now just add this line at the end
"force-color-profile": "srgb",

It will display a zig-zag line underneath the entry and say “Property force-color-profile is not allowed.”. Just ignore it and save the file.

3. Restart VSCode.

Voila!!! Issue is fixed.

--

--

Web & Software Developer. Designer. Home cook.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store