Skip to content
Zesona
Color Escape Sequence ViewerLocal

Color Escape Sequence Viewer

A reference table of ANSI escape sequences for terminal colour and text attributes, with CSS equivalents.

  • Free
  • No sign-up
  • Runs in your browser

Input

Runs in your browser

The full table is shown; use your browser’s find to search it.

Ready

Everything happens on this device. No upload, no account, no network request.

How to use this tool

  1. 1

    The SGR sequences terminals use for colour and text attributes are listed below.

  2. 2

    Each entry shows the escaped form you would write in code, and a CSS equivalent where one exists.

Questions about Color Escape Sequence Viewer

How do I write the escape character?

It depends on the language. `\e` works in `echo -e` and in printf on most shells; `\033` and `\x1b` are the octal and hex forms and work almost everywhere; JavaScript, Python and Go all accept `\u001b`. All four produce byte 27.

Why do the colours look different in my terminal?

Because the 16 basic colours are names, not values - each terminal theme decides what "red" looks like. The CSS equivalents here use the standard xterm palette as a reference. For exact colours use the 256-colour (`38;5;n`) or 24-bit (`38;2;r;g;b`) forms.

How do I strip these from captured output?

Match the CSI pattern `\x1b\[[0-9;]*m` for colour codes, or the broader `\x1b\[[0-?]*[ -/]*[@-~]` for all CSI sequences. Remember OSC sequences too (hyperlinks, window titles), which terminate differently - with BEL or ESC backslash.

Is my data sent anywhere?

No. This tool runs as JavaScript inside your browser tab. There is no network request carrying your input, nothing is written to a server log, and it keeps working with your connection switched off. You can confirm it in the browser’s network panel. That matters more here than elsewhere on the site: developer tools handle tokens, keys and production data.

Does the Color Escape Sequence Viewer work offline?

Yes. Once the page has loaded it runs entirely as JavaScript on your own device, so the Color Escape Sequence Viewer keeps working with the network switched off and nothing is ever sent to a server.

Other tools you might reach for next.