Home > Uncategorized > Fix PuTTY Colors

Fix PuTTY Colors

Do you find the default colors within PuTTY to be often too dark to read?

image source: http://www.darkrune.org/blog/?p=213

With a couple snippets of PowerShell you can update all your existing saved PuTTY sessions to use a more readable shade of blue.

Get-ItemProperty -Path HKCU:\Software\SimonTatham\PuTTY\Sessions\* | foreach-object {set-itemproperty -path $_.pspath -name Colour14 -value "38,139,210"}
Get-ItemProperty -Path HKCU:\Software\SimonTatham\PuTTY\Sessions\* | foreach-object {set-itemproperty -path $_.pspath -name Colour15 -value "38,139,210"}

And now it’s much easier to read:
after

If you prefer the very nice ZenBurn theme, run these PowerShell commands and all your saved PuTTY session (including the Default) will be updated to use it:

$Theme_ZenBurn=@{
	"Colour0"="220,220,204";
	"Colour1"="220,220,204";
	"Colour2"="58,58,58";
	"Colour3"="58,58,58";
	"Colour4"="0,13,24";
	"Colour5"="143,175,159";
	"Colour6"="0,0,0";
	"Colour7"="85,85,85";
	"Colour8"="215,135,135";
	"Colour9"="215,135,135";
	"Colour10"="160,192,160";
	"Colour11"="160,192,160";
	"Colour12"="255,255,135";
	"Colour13"="255,255,135";
	"Colour14"="101,121,142";
	"Colour15"="101,121,142";
	"Colour16"="241,140,150";
	"Colour17"="241,140,150";
	"Colour18"="140,208,211";
	"Colour19"="140,208,211";
	"Colour20"="255,255,255";
	"Colour21"="255,255,255";
}

### Pick a theme
$NewPuttyColors = $Theme_ZenBurn

foreach ($setting in $NewPuttyColors.GetEnumerator()) {
    Write-Host "$($setting.Name): $($setting.Value)"
    Get-ItemProperty -Path HKCU:\Software\SimonTatham\PuTTY\Sessions\* | foreach-object {set-itemproperty -path $_.pspath -name $setting.Name -value $setting.Value}
}

Write-Host "Completed applying new PuTTY color profile to all existing sessions."

I personally prefer the Solarized theme. Run these PowerShell commands to change all your current (and Default) sessions to use this theme:

image source: http://lkhill.com/reminder-solarized-for-better-terminals/


$Theme_Solarized=@{
	"Colour0"="131,148,150";
	"Colour1"="147,161,161";
	"Colour2"="0,43,54";
	"Colour3"="7,54,66";
	"Colour4"="0,43,54";
	"Colour5"="238,232,213";
	"Colour6"="7,54,66";
	"Colour7"="0,43,54";
	"Colour8"="220,50,47";
	"Colour9"="203,75,22";
	"Colour10"="133,153,0";
	"Colour11"="88,110,117";
	"Colour12"="181,137,0";
	"Colour13"="101,123,131";
	"Colour14"="38,139,210";
	"Colour15"="38,139,210";
	"Colour16"="211,54,130";
	"Colour17"="108,113,196";
	"Colour18"="42,161,152";
	"Colour19"="147,161,161";
	"Colour20"="238,232,213";
	"Colour21"="253,246,227";
}

### Pick a theme
$NewPuttyColors = $Theme_Solarized

foreach ($setting in $NewPuttyColors.GetEnumerator()) {
    Write-Host "$($setting.Name): $($setting.Value)"
    Get-ItemProperty -Path HKCU:\Software\SimonTatham\PuTTY\Sessions\* | foreach-object {set-itemproperty -path $_.pspath -name $setting.Name -value $setting.Value}
}

Write-Host "Completed applying new PuTTY color profile to all existing sessions."
Advertisements
Categories: Uncategorized
  1. Gears Gharim
    May 12, 2016 at 2:19 AM

    Nice posting… Thank you.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s