Skip to content
| Marketplace
Sign in
Visual Studio Code>Themes>ANSI ColorsNew to Visual Studio Code? Get it now.
ANSI Colors

ANSI Colors

Ilia Pozdnyakov

|
125,887 installs
| (13) | Free
ANSI color styling for text documents
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Visual Studio Marketplace GitHub MIT License Open Issues Closed Issues

ANSI Colors

ANSI Color styling for your text editor.

Basic usage

Select the ANSI Text language mode to highlight text marked up with ANSI escapes. Files with the .ans and .ansi extensions will be highlighted by default.

ANSI Text language mode; Dark Plus theme

Run the ANSI Text: Open Preview command for the prettified read-only preview.

ANSI Text preview; Dark Plus theme

Clicking the preview icon in the editor title will open the preview in a new tab. Alt-click to open in the current tab.

Preview icon

The extension fetches the colors from the current theme and aims to look as good as the built-in terminal.

ANSI Text preview; various themes

Supported ANSI escape codes

Basic colors and formatting:

Basic formatting

8-bit colors:

8-bit colors

24-bit colors:

24-bit colors

Custom file icon

You can add an icon to the ANSI text files by using the vscode-icons extension:

{
  // add this to your settings file
  "vsicons.associations.files": [
    {
      "icon": "text", // or any other icon from vscode-icons
      "extensions": ["ans", "ansi"],
      "format": "svg"
    }
  ]
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft