ARTASCIIcreate with characters
Practical guide · reproducible examples

ASCII and ANSI: text, colours and terminal sequences

ASCII defines character codes. “ANSI art” generally refers to drawings whose terminal also interprets colour or formatting sequences. Text coloured in a terminal does not necessarily keep those colours elsewhere.

Distinguish three elements

ElementExampleRole
Texte / textOKCaractères visibles / visible characters
Contrôle / controlESC [ 31 mCouleur / colour
TerminalVT compatibleInterprétation / interpretation

ECMA-48 describes control functions. ANSI is often used as shorthand; it is not one universal encoding that makes all files equivalent. The presence of sequences does not prove the destination software supports them.

Example 1: red then reset in Bash

printf '\033[31m%s\033[0m\n' 'OK'

In a compatible terminal, this command requests red for OK and then resets formatting. \033 is an octal ESC escape in the printf format; the characters \, 0, 3, 3 are not meant to appear on screen. Code 0m prevents the colour from remaining active afterward. The actual shade depends on the theme.

Example 2: the same message without colour

printf '%s\n' 'OK'

This version contains no formatting sequence. It suits a log file or an environment with an unknown terminal. For a multiline drawing, keep a TXT version without sequences too: that version can be pasted into Markdown without showing unwanted codes.

Compatibility and limits

Microsoft’s VT sequence documentation describes relevant Windows console behaviour and modes. A text editor or messaging app need not act like a terminal. The command examples target Bash, not cmd. ArtASCII tools export text and images, not a coloured ANSI-art file.

Check before sharing

Compare coloured and plain versions: all information should remain understandable without colour. Test light and dark themes. Keep sequences for destinations designed for them; they can also affect the cursor and are not merely decorative letters.

Display in Bash · ESC in the ASCII table