How To Change Command Prompt Color

7 min read

How to Change Command Prompt Color: A Step‑by‑Step Guide for Windows Users

Changing the command prompt color can make your terminal more comfortable to read, help you spot important messages, and even give your workflow a personal touch. Whether you want to brighten a dark window for better visibility or match the colors to your brand, the process is straightforward once you know the right commands and options. This article walks you through everything you need to know about how to change command prompt color, from simple on‑the‑fly tweaks to permanent customizations using the Windows Registry and PowerShell.

Introduction

The default black‑on‑white scheme of the Command Prompt (cmd.Practically speaking, exe) works for most users, but prolonged exposure can strain your eyes, especially in low‑light environments. In practice, by learning how to change command prompt color, you can improve readability, reduce eye fatigue, and even create a more professional appearance for scripts or presentations. This guide covers the most common methods: using the built‑in color command, adjusting the registry for persistence, and leveraging PowerShell for advanced control. Each step is explained with clear screenshots and tips, so you’ll be able to customize your terminal quickly and confidently That's the part that actually makes a difference..

Steps to Change Command Prompt Color Instantly

1. Use the color Command

The simplest way to alter the cmd color scheme is with the color command, which accepts two hexadecimal‑style numbers: the first for the background and the second for the foreground (text) Not complicated — just consistent..

  1. Open Command Prompt (press Win + R, type cmd, and hit Enter).
  2. Type color 0A and press Enter.
    • 0 = black background
    • A = bright green text

You can experiment with any combination of the following digits (0‑9, A‑F). For example:

  • color 1F → dark blue background with bright white text
  • color 4E → red background with light gray text

Tip: If you want a light background, use digits 8‑F (e.g., color 8A for light gray background with bright green text) Small thing, real impact..

2. Combine with title for Extra Flair

While color changes the palette, the title command updates the window’s title bar. Combining both creates a cohesive look:

color 0B
title My Custom Prompt

Now the window title reads “My Custom Prompt” and the console colors reflect your choice Most people skip this — try not to..

3. Save Settings Using a Batch File

If you frequently need the same color scheme, create a small batch file:

  1. Open Notepad and paste:
@echo off
color 0A
title Custom Prompt
  1. Save the file as custom_prompt.bat. Double‑clicking it will launch a new cmd window with your preferred colors instantly.

4. Adjust Colors via the Registry (Permanent Change)

For a system‑wide or user‑specific permanent change, edit the Windows Registry. This method is useful if you want the colors to persist after reboot That's the part that actually makes a difference..

  1. Press Win + R, type regedit, and hit Enter.
  2. deal with to:
HKEY_CURRENT_USER\Console\CRL
  1. Locate the ColorTableXX entries (e.g., ColorTable00 for black, ColorTable0F for bright white).
  2. Right‑click a value, choose Modify, and enter a six‑digit hexadecimal color code (RRGGBB).
  3. Close Registry Editor. The changes take effect the next time you open Command Prompt.

Caution: Editing the Registry can affect other applications. Always export a backup before modifying Simple as that..

5. Use PowerShell for Advanced Color Control

PowerShell offers a more flexible approach, allowing you to set foreground and background colors using ANSI escape sequences (supported in newer Windows terminals) It's one of those things that adds up. That's the whole idea..

  1. Open PowerShell (Win + R, type powershell, Enter).
  2. Run:
$Host.UI.RawUI.WindowTitle = "My Prompt"
$Host.UI.RawUI.BackgroundColor = "Green"
$Host.UI.RawUI.ForegroundColor = "Black"

To apply these settings globally, you can create a PowerShell profile script ($PROFILE) that runs at startup It's one of those things that adds up..

Scientific Explanation

How the color Command Works

The color command in cmd.exe interprets two nibbles (each representing a 4‑bit value). The first nibble controls the background color, the second controls the text foreground.

Digit Color (Background) Digit Color (Foreground)
0 Black 8 Gray
1 Blue 9 Bright Blue
2 Green A Bright Green
3 Cyan B Bright Cyan
4 Red C Bright Red
5 Magenta D Bright Magenta
6 Yellow E Bright Yellow
7 White F Bright White

When you issue color 0A, the system sets the background to black (0) and the foreground to bright green (A). This low‑level mapping is stored in the console’s internal color table, which is why changes are immediate and do not require a restart.

Registry Color Tables

Each ColorTableXX entry in the registry corresponds to a specific color index used by the console driver. Modifying these entries changes the color palette that cmd.The six‑digit hex values represent the RGB components (Red, Green, Blue). Even so, for example, 0x0000FF sets the color to pure blue. exe reads at startup, ensuring the chosen colors are retained across sessions.

ANSI Escape Sequences in PowerShell

Modern Windows 10/11 includes support for ANSI escape codes, which PowerShell translates into console attributes. Also, powerShell’s Host. Commands like \e[31mset foreground red, while\e[44m sets background blue. UI.RawUI properties provide a programmatic way to manipulate these attributes, giving you fine‑grained control over color and style.

FAQ

FAQ

Why do my colors reset every time I close the Command Prompt?

The color command only modifies the current console session. The moment that conhost.exe process exits, the change is gone. To make it permanent you need one of the persistent methods: the shortcut's Properties → Colors tab, the HKEY_CURRENT_USER\Console registry values, or a startup script ($PROFILE in PowerShell, or an autorun entry in HKCU\Software\Microsoft\Command Processor).

I typed color 08 and now I can't read anything. How do I fix it?

Dark gray text on a black background is technically valid but nearly unreadable. Now, type color with no arguments to restore the console's default scheme, or run color 07 for the classic white-on-black. If the window is too dark to read what you're typing, close it and open a new one — the bad setting won't follow you.

And yeah — that's actually more nuanced than it sounds Most people skip this — try not to..

Why does color reject some of my commands?

Only the 16 hexadecimal digits 0–9 and A–F are valid, and you must supply exactly two of them. Anything else (color 1G, color 123, color red) returns Invalid parameter and leaves the existing colors untouched. There is no way to specify an arbitrary RGB value through the color command itself — that requires editing the ColorTableXX entries.

Short version: it depends. Long version — keep reading That's the part that actually makes a difference..

Can I get more than 16 colors in cmd.exe?

Not through the color command, which is hard-limited to the legacy 16-color console table. Still, modern Windows conhost understands ANSI/VT sequences, so a sufficiently recent shell or program can emit 256-color or truecolor escape codes. In practice, if you want a rich palette, Windows Terminal with its own color schemes is the better path Small thing, real impact..

Why don't my registry color changes show up in Windows Terminal?

Windows Terminal does not read the legacy ColorTableXX values. It maintains its own profiles and schemes in settings.Consider this: json, where each profile can define colorScheme, foreground, background, and an explicit experimental. colorTable or named scheme. Change the scheme there instead, and leave the registry alone.

Does the color command work in PowerShell?

color is a cmd.So exe built-in, not a PowerShell cmdlet, so typing it in a PowerShell session will not do what you expect. In practice, use `$Host. UI.RawUI.

$Host.UI.RawUI.On the flip side, backgroundColor and $Host. UI.RawUI.foregroundColor to set the background and foreground colors, respectively That's the whole idea..

$Host.UI.RawUI.backgroundColor = "Blue"
$Host.UI.RawUI.foregroundColor = "White"

Note that these changes are also session-specific and will reset when PowerShell exits. For persistent PowerShell color settings, consider editing your $PROFILE script to include these commands every time you start the shell.

Conclusion

While the color command remains a quick, built-in method for adjusting the cmd.Whether you rely on registry edits for system-wide defaults, shortcut properties for per-session convenience, or the richer color schemes of Windows Terminal, understanding these tools ensures your command-line environment stays both functional and visually made for your needs. But exe console appearance, its limitations—session-only persistence, a strict 16-color palette, and incompatibility with modern terminals—often necessitate alternative approaches. As shells evolve, embracing these flexible configuration options will help you maintain an efficient and personalized workflow And it works..

New Additions

New Stories

In That Vein

These Fit Well Together

Thank you for reading about How To Change Command Prompt Color. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home