Customize console colors for command-line tools

The following command-line tools output colored help and messages: TPPTool.exe, TPPConfiguration.exe, and TPPPki.

If you prefer different colors—or no color—you can override the defaults using Windows Registry values under: HKLM\Software\Venafi\Platform. See Microsoft’s Windows Registry overview for general background. About the Windows Registry

Before you start

  • You need administrative privileges to write to HKLM.
  • Restart the tool (or the console session) after changing values.
  • Defaults use ANSI escape sequences. Background on ANSI codes: ANSI escape codes
  • In all defaults, \u001b (or \001b) represents the <ESC> character.

Registry values

Create one string value for each color you want to customize under HKLM\Software\Venafi\Platform. If a value is missing, the tool uses its built-in default.

Registry Value (Name) Applies to Purpose Type Default Value Default Effect
Console Title Color Product ANSI color sequence for the application title REG_SZ \u001b[32m Green text (tool name/title)
Console Category Color Product ANSI color sequence for argument category headings REG_SZ \u001b[36m Cyan text (headings)
Console Option Color Product Color for the mandatory part of an option REG_SZ \u001b[97m Bright white text (required options)
Console Optional Color Product Color for the optional part of an option REG_SZ \u001b[38;5;250m Light gray text (optional parts)
Console Argument Color Product Color for the argument indicator of an option REG_SZ \u001b[38;5;220m Golden yellow text (arguments)
Console Description Color Product Color for option descriptions REG_SZ \u001b[0m Reset to system default (descriptive text)
Console Error Color Product Color for errors REG_SZ \u001b[97;101m Bright white on red background (errors)
Console Example Color Product Color for examples REG_SZ \u001b[36m Cyan text (examples)
Console Reset Color Product Sequence that resets to the default system color REG_SZ \u001b[0m Reset to system default (end of formatting)

Examples

PowerShell (run as Administrator)

# Set errors to bright white on red
New-Item -Path "HKLM:\Software\Venafi\Platform" -Force | Out-Null
New-ItemProperty -Path "HKLM:\Software\Venafi\Platform" `
-Name "Console Error Color" -PropertyType String -Value "\u001b[97;101m" -Force | Out-Null # Turn off color by resetting sequences to no-op (ESC[0m immediately) New-ItemProperty -Path "HKLM:\Software\Venafi\Platform" ` -Name "Console Title Color" -PropertyType String -Value "\u001b[0m" -Force | Out-Null

Command Prompt (reg.exe)

REM Set optional text to gray (xterm 250)
reg add "HKLM\Software\Venafi\Platform" /v "Console Optional Color" /t REG_SZ /d "\u001b[38;5;250m" /f

Disabling color completely

To effectively remove color, set each value you care about to \u001b[0m (reset). If a value is not present, the tool uses its built-in default color.

Troubleshooting

  • If you see raw sequences (like [36m) instead of color, your terminal may not support ANSI colors (for example, very old consoles) or the escape character wasn’t written correctly.
  • Make sure there are no extra quotes or spaces around the values.
  • Confirm the values are under HKLM\Software\Venafi\Platform (not per-user HKCU).