KiTTY - Monochromatic Environment Color Configuration
Unifying KiTTY Session Colors in Windows Registry
Forcing a monochromatic mode while maintaining distinct background colors for environments (DEV, TEST, PROD) eliminates the unreadability of the built-in ANSI palette in terminal editors.
Environment & Colors Overview
Here is a summary of the environment mappings and background colors (Colour2 in KiTTY configuration):
| Environment | Pattern Match | Background Color | RGB Value | Preview |
|---|---|---|---|---|
| DEV | Session name ends with d |
Green | 73,111,55 |
■ |
| TEST | Session name ends with t |
Teal | 32,128,145 |
■ |
| PROD | Session name ends with p |
Red / Rust | 142,56,32 |
■ |
| PROD (Linux) | Session name contains -plx- |
Red / Rust | 142,56,32 |
■ |
Backup Registry First
Modifying Windows Registry directly can cause system issues or configuration loss. Always back up the registry branch before making changes.
Modifying Windows Registry directly can cause system issues or configuration loss. Always back up the registry branch before making changes.
Backup and Export Sessions
- Export the existing KiTTY sessions registry branch:
reg export HKCU\Software\9bis.com\KiTTY\Sessions kitty-sessions-backup.reg - Create a copy of the exported file (e.g.,
kitty-sessions-working.reg) to perform the modifications on. - Delete the
Sessionsbranch from the registry so we can re-import a clean copy:reg delete HKCU\Software\9bis.com\KiTTY\Sessions /f
Remove Existing Color Attributes
Open kitty-sessions-working.reg in Notepad++ and switch search mode to Regular expression. Remove any existing color keys to avoid conflicts:
Find (Regex):
^"(Colour[0-9]+|AnsiColour|Xterm256Colour)"=.*\r?\n
Replace with:
(leave empty)Inject Monochromatic Profile
Apply the base monochromatic colors (white text, black background) across all sessions:
Find (Regex):
^(\[HKEY_CURRENT_USER\\Software\\9bis\.com\\KiTTY\\Sessions\\.*\])
Replace with:
$1\r\n"AnsiColour"=dword:00000000\r\n"Colour0"="255,255,255"\r\n"Colour1"="255,255,255"\r\n"Colour18"="0,0,0"\r\n"Colour19"="255,255,255"Assign Background Colors (Colour2)
Apply the distinct background colors for each environment based on session naming rules.
DEV Sessions (suffix d)
Find (Regex):
^(\[HKEY_CURRENT_USER\\Software\\9bis\.com\\KiTTY\\Sessions\\[^\]]*d(?:%2E[^\]]+|\.[^\]]+)?\])
Replace with:
$1\r\n"Colour2"="73,111,55"TEST Sessions (suffix t)
Find (Regex):
^(\[HKEY_CURRENT_USER\\Software\\9bis\.com\\KiTTY\\Sessions\\[^\]]*t(?:%2E[^\]]+|\.[^\]]+)?\])
Replace with:
$1\r\n"Colour2"="32,128,145"PROD Sessions (suffix p)
Find (Regex):
^(\[HKEY_CURRENT_USER\\Software\\9bis\.com\\KiTTY\\Sessions\\[^\]]*p(?:%2E[^\]]+|\.[^\]]+)?\])
Replace with:
$1\r\n"Colour2"="142,56,32"PROD Linux Sessions (containing -plx-)
Find (Regex):
^(\[HKEY_CURRENT_USER\\Software\\9bis\.com\\KiTTY\\Sessions\\[^\]]*-plx-[^\]]*\])
Replace with:
$1\r\n"Colour2"="142,56,32"Import Updated Configurations
Double-click the modified kitty-sessions-working.reg file, or run the following command in PowerShell/CMD to restore the updated sessions:
reg import kitty-sessions-working.reg
Last updated on