Home

MUME Help

ANSI CODES


The standard ANSI codes are listed below.

They might not behave the same way on all types of terminals, (this goes especially for the styles) so do not use them where they can create trouble for others.

Foreground Colours        High Colours
Black... <esc>[30m        Black... <esc>[90m
Red..... <esc>[31m        Red..... <esc>[91m
Green... <esc>[32m        Green... <esc>[92m
Yellow.. <esc>[33m        Yellow.. <esc>[93m
Blue.... <esc>[34m        Blue.... <esc>[94m
Magenta. <esc>[35m        Magenta. <esc>[95m
Cyan.... <esc>[36m        Cyan.... <esc>[96m
White... <esc>[37m        White... <esc>[97m
Background Colours        Background High Colours
Black... <esc>[40m        Black... <esc>[100m
Red..... <esc>[41m        Red..... <esc>[101m
Green... <esc>[42m        Green... <esc>[102m
Yellow.. <esc>[43m        Yellow.. <esc>[103m
Blue.... <esc>[44m        Blue.... <esc>[104m
Magenta. <esc>[45m        Magenta. <esc>[105m
Cyan.... <esc>[46m        Cyan.... <esc>[106m
White... <esc>[47m        White... <esc>[107m
Text Style Attributes
Bold......... <esc>[1m
Faint........ <esc>[2m
Italic....... <esc>[3m
Underline.... <esc>[4m
Blink........ <esc>[5m
Inverse...... <esc>[7m
Ansi off..... <esc>[0m
For terminals that support 256 colours, <esc>[38;5;Nm and <esc>[48;5;Nm set the foreground and background, respectively, to N, one of:
0-7 standard colours black through white as above
8-15 high intensity colours black through white as above
16-231 6×6×6 values of varying red/green/blue intensity
232-255 24 shades of grey, dark to bright

For terminals that support 24-bit RGB colours, <esc>[38;2;r;g;bm sets the foreground (use 48 for background), where r, g, and b are the red/green/blue components, each 0-255.


Generated on Sun Jul 5 23:36:17 2020