Making Colour work on the Command Line for Windows

I’ll make a confession. I don’t own a Microsoft Windows Machine. I never have and probably never will. This means that I generally never get the oppertunity to test Swingbench on Windows when I release the code. I just assume it will be ok or someone will complain.

My friend Connor McDonald was the first to complain…. Thanks Connor

It seems that by default that on Windows it doesn’t render the escape codes that makes the magic happen for colour text so you end up with some thing like this full It’s an easy fix you just need to update the registry

reg add HKEY_CURRENT_USER\Console /v VirtualTerminalLevel /t REG_DWORD /d 0x00000001 /f

and the following to put it back to its original value

reg add HKEY_CURRENT_USER\Console /v VirtualTerminalLevel /t REG_DWORD /d 0x00000000 /f

This change will solve the problem and render colour full

I’ll release a fix shortly that turns colour off automatically on Windows but enables you to turn it on from the command line rather than just being able to turn it off.

2022

Making Colour work on the Command Line for Windows

less than 1 minute read

I’ll make a confession. I don’t own a Microsoft Windows Machine. I never have and probably never will. This means that I generally never get the oppertunity ...

A New Release of Swingbench

2 minute read

A New Release of Swingbench… Along with a new website, I’m rolling out a new build of Swingbench. This release is a little embarrassing for me, as it include...

A New Look

2 minute read

A New Start… Quite a lot has changed since I last posted on this website. I had just left Oracle to join Google… A year and a half later I returned to Oracle...

Back to Top ↑