Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet thread from alt.ascii-art, started 1 Apr 1996.
 _   _                     _        _             _     _           
| | | |___  ___ _ __   ___| |_     / \   _ __ ___| |__ (_)_   _____ 
| | | / __|/ _ \ '_ \ / _ \ __|   / _ \ | '__/ __| '_ \| \ \ / / _ \
| |_| \__ \  __/ | | |  __/ |_   / ___ \| | | (__| | | | |\ V /  __/
 \___/|___/\___|_| |_|\___|\__| /_/   \_\_|  \___|_| |_|_| \_/ \___|
Escape Codes

Escape Codes

alt.ascii-art · 2 messages · 1 Apr 1996 - 4 Apr 1996
	Could someone send me the escape codes for changing colours on 
the screen.   Thanks.



P.S.:	Please respond through  E-mail.


______________________________________________________________________________
From:   Brian Beharry
E-mail: bbe...@uoguelph.ca

Benjamin Goldberg <gol...@rpi.edu> ASCII art 4 Apr 1996 00:00 · permalink · report
these few codes I figured out myself, and I'll attach a file I got off a MUD (multi-user dungeon)

ESC[?5h enable reverse video
ESC[?5l turn off reverse video
cntrl-G beep!
ESC[8m make text invis
some of these do not work on various terminals
also, on a type of terminal emulator called an "aixterm"
you have to add 60 to the numbers to get a true white(ie ESC[97m and ESC[107m ),
and if you change other colors likewise, you get slightly lighter colors
(black becomes dark grey, etc)


 
//	File	:  /include/ansi.h
//	Creator	:  Gothic@TMI-2  
//
//	The standard set of ANSI codes for mudlib use.
 
#define ESC	""
#define CSI	ESC + "["
 
                /*  Foreground Colors  */
 
#define BLK ESC+"[30m"          /* Black    */
#define RED ESC+"[31m"          /* Red      */
#define GRN ESC+"[32m"          /* Green    */
#define YEL ESC+"[33m"          /* Yellow   */
#define BLU ESC+"[34m"          /* Blue     */
#define MAG ESC+"[35m"          /* Magenta  */
#define CYN ESC+"[36m"          /* Cyan     */
#define WHT ESC+"[37m"          /* White    */
 
                /*   Hi Intensity Foreground Colors   */
 
#define HIR ESC+"[1;31m"        /* Red      */
#define HIG ESC+"[1;32m"        /* Green    */
#define HIY ESC+"[1;33m"        /* Yellow   */
#define HIB ESC+"[1;34m"        /* Blue     */
#define HIM ESC+"[1;35m"        /* Magenta  */
#define HIC ESC+"[1;36m"        /* Cyan     */
#define HIW ESC+"[1;37m"        /* White    */
 
                /*  Background Colors  */
 
#define BBLK ESC+"[40m"          /* Black    */
#define BRED ESC+"[41m"          /* Red      */
#define BGRN ESC+"[42m"          /* Green    */
#define BYEL ESC+"[43m"          /* Yellow   */
#define BBLU ESC+"[44m"          /* Blue     */
#define BMAG ESC+"[45m"          /* Magenta  */
#define BCYN ESC+"[46m"          /* Cyan     */
#define BWHT ESC+"[47m"          /* White    */
 
                /* High Intensity Background Colors  */
 
#define HBRED ESC+"[41;1m"       /* Red      */
#define HBGRN ESC+"[42;1m"       /* Green    */
#define HBYEL ESC+"[43;1m"       /* Yellow   */
#define HBBLU ESC+"[44;1m"       /* Blue     */
#define HBMAG ESC+"[45;1m"       /* Magenta  */
#define HBCYN ESC+"[46;1m"       /* Cyan     */
#define HBWHT ESC+"[47;1m"       /* White    */
 
#define NOR ESC+"[2;37;0m"      /* Puts everything back to normal */
 
/*  Additional ansi Esc codes added to ansi.h by Gothic  april 23,1993 */
/* Note, these are Esc codes for VT100 terminals, and emmulators */
/*       and they may not all work within the mud               */
 
#define BOLD ESC+"[1m"          /* Turn on bold mode */
#define CLR ESC+"[2J"           /* Clear the screen  */
#define HOME ESC+"[H"           /* Send cursor to home position */
#define REF CLR+HOME            /* Clear screen and home cursor */
#define BIGTOP ESC+"#3"         /* Dbl height characters, top half */
#define BIGBOT ESC+"#4"         /* Dbl height characters, bottem half */
#define SAVEC ESC+"[s"           /* Save cursor position */
#define REST ESC+"[u"            /* Restore cursor to saved position */
#define REVINDEX ESC+"M"        /* Scroll screen in opposite direction */
#define SINGW ESC+"#5"          /* Normal, single-width characters */
#define DBL ESC+"#6"            /* Creates double-width characters */
#define FRTOP ESC+"[2;25r"      /* Freeze top line */
#define FRBOT ESC+"[1;24r"      /* Freeze bottom line */
#define UNFR ESC+"[r"           /* Unfreeze top and bottom lines */
#define BLINK ESC+"[5m"         /* Initialize blink mode */
#define U ESC+"[4m"             /* Initialize underscore mode */
#define REV ESC+"[7m"           /* Turns reverse video mode on */
#define HIREV ESC+"[1,7m"       /* Hi intensity reverse video  */
 


About this thread. These messages were posted publicly to the newsgroup alt.ascii-art in 1996 and are mirrored here unchanged as part of the Historic Archives – only email addresses are masked. The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can. Are you one of the authors? Contact us to get your posts attributed, connected to your artist profile, or removed.

Report this message

Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.

Help classify this post