CINXE.COM
View source for ANSI escape code - Wikipedia
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-disabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-not-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>View source for ANSI escape code - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-disabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-not-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":true,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat": "dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"b022ca95-4f5e-4f99-ad92-b061c6fdab35","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"ANSI_escape_code","wgTitle":"ANSI escape code","wgCurRevisionId":1258142553,"wgRevisionId":0,"wgArticleId":65930,"wgIsArticle":false,"wgIsRedirect":false,"wgAction":"edit","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"ANSI_escape_code","wgRelevantArticleId":65930,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0, "wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":100000,"wgRelatedArticlesCompat":[],"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","skins.vector.search.codex.styles":"ready", "skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.makeCollapsible.styles":"ready","ext.charinsert.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["mediawiki.action.edit.collapsibleFooter","site","mediawiki.page.ready","jquery.makeCollapsible","skins.vector.js","ext.centralNotice.geoIP","ext.charinsert","ext.gadget.ReferenceTooltips","ext.gadget.charinsert","ext.gadget.extra-toolbar-buttons","ext.gadget.refToolbar","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.checkUser.clientHints","ext.growthExperiments.SuggestedEditSession", "wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.charinsert.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.5"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="noindex,nofollow,max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/b/b1/Htop.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="667"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/b/b1/Htop.png"> <meta property="og:image:width" content="800"> <meta property="og:image:height" content="444"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b1/Htop.png/640px-Htop.png"> <meta property="og:image:width" content="640"> <meta property="og:image:height" content="356"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="View source for ANSI escape code - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/ANSI_escape_code"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=ANSI_escape_code&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/ANSI_escape_code"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&feed=atom"> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-ANSI_escape_code rootpage-ANSI_escape_code skin-vector-2022 action-edit"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&returnto=ANSI+escape+code&returntoquery=action%3Dedit" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&returnto=ANSI+escape+code&returntoquery=action%3Dedit" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&returnto=ANSI+escape+code&returntoquery=action%3Dedit" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&returnto=ANSI+escape+code&returntoquery=action%3Dedit" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <h1 id="firstHeading" class="firstHeading mw-first-heading">View source for ANSI escape code</h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="This article exist only in this language. Add the article for other languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-0" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">Add languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> <div class="after-portlet after-portlet-lang"><span class="uls-after-portlet-link"></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/ANSI_escape_code" title="View the content page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:ANSI_escape_code" rel="discussion" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="vector-tab-noicon mw-list-item"><a href="/wiki/ANSI_escape_code"><span>Read</span></a></li><li id="ca-edit" class="selected vector-tab-noicon mw-list-item"><a href="/w/index.php?title=ANSI_escape_code&action=edit" title="Edit this page"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=ANSI_escape_code&action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="vector-more-collapsible-item mw-list-item"><a href="/wiki/ANSI_escape_code"><span>Read</span></a></li><li id="ca-more-edit" class="selected vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=ANSI_escape_code&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=ANSI_escape_code&action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/ANSI_escape_code" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/ANSI_escape_code" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=ANSI_escape_code&action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fen.wikipedia.org%2Fw%2Findex.php%3Ftitle%3DANSI_escape_code%26action%3Dedit"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fen.wikipedia.org%2Fw%2Findex.php%3Ftitle%3DANSI_escape_code%26action%3Dedit"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q760000" title="Structured data on this page hosted by Wikidata [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> </div> <div id="contentSub"><div id="mw-content-subtitle">← <a href="/wiki/ANSI_escape_code" title="ANSI escape code">ANSI escape code</a></div></div> <div id="mw-content-text" class="mw-body-content"><p>You do not have permission to edit this page, for the following reasons: </p> <ul class="permissions-errors"><li class="mw-permissionerror-blockedtext"> <div id="mw-blocked-text" style="border: 1px solid #AAA; background-color: var(--background-color-warning-subtle, ivory); color: inherit; padding: 1.5em; width: 100%; box-sizing: border-box;"> <div style="text-align: center;"><span style="font-size: 26px;"><span typeof="mw:File"><a href="/wiki/File:Stop_hand_nuvola.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/en/thumb/f/f1/Stop_hand_nuvola.svg/50px-Stop_hand_nuvola.svg.png" decoding="async" width="50" height="50" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/f/f1/Stop_hand_nuvola.svg/75px-Stop_hand_nuvola.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/f/f1/Stop_hand_nuvola.svg/100px-Stop_hand_nuvola.svg.png 2x" data-file-width="240" data-file-height="240" /></a></span><b> This IP address has been <a href="/wiki/Wikipedia:Blocking_policy" title="Wikipedia:Blocking policy">blocked</a> from <i>editing</i> Wikipedia.</b></span><br /><span style="font-size: 18px;">This does not affect your ability to <i>read</i> Wikipedia pages.</span></div><div class="paragraphbreak" style="margin-top:0.5em"></div><b>Most people who see this message have done nothing wrong.</b> Some kinds of blocks restrict editing from specific service providers or telecom companies in response to recent abuse or vandalism, and can sometimes affect other users who are unrelated to that abuse. Review the information below for assistance if you do not believe that you have done anything wrong.<div class="paragraphbreak" style="margin-top:0.5em"></div> <p>The IP address or range 8.222.128.0/17 has been <a href="/wiki/Wikipedia:Blocking_policy" title="Wikipedia:Blocking policy">blocked</a> by <a href="/wiki/User:L235" title="User:L235">L235</a> for the following reason(s): </p> <div style="padding:10px; background:var(--background-color-base, white); color:inherit; border:1px #666 solid;"> <div class="user-block colocation-webhost" style="margin-bottom: 0.5em; background-color: #ffefd5; border: 1px solid #AAA; padding: 0.7em;"> <figure class="mw-halign-left" typeof="mw:File"><span><img src="//upload.wikimedia.org/wikipedia/commons/thumb/5/53/Server-multiple.svg/40px-Server-multiple.svg.png" decoding="async" width="40" height="57" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/5/53/Server-multiple.svg/60px-Server-multiple.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/5/53/Server-multiple.svg/80px-Server-multiple.svg.png 2x" data-file-width="744" data-file-height="1052" /></span><figcaption></figcaption></figure><b>The <a href="/wiki/IP_address" title="IP address">IP address</a> that you are currently using has been blocked because it is believed to be a <a href="/wiki/Web_hosting_service" title="Web hosting service">web host provider</a> or <a href="/wiki/Colocation_centre" title="Colocation centre">colocation provider</a>.</b> To prevent abuse, <a href="/wiki/Wikipedia:Open_proxies" title="Wikipedia:Open proxies">web hosts and colocation providers may be blocked</a> from editing Wikipedia. <div style="border-top: 1px solid #AAA; clear: both">You will not be able to edit Wikipedia using a web host or colocation provider because it hides your IP address, much like a <a href="/wiki/Wikipedia:Open_proxies" title="Wikipedia:Open proxies">proxy</a> or <a href="/wiki/Virtual_private_network" title="Virtual private network">VPN</a>. <p><b>We recommend that you attempt to use another connection to edit.</b> For example, if you use a proxy or VPN to connect to the internet, turn it off when editing Wikipedia. If you edit using a mobile connection, try using a Wi-Fi connection, and vice versa. If you are using a corporate internet connection, switch to a different Wi-Fi network. If you have a Wikipedia account, please log in. </p><p>If you do not have any other way to edit Wikipedia, you will need to <a href="/wiki/Wikipedia:IP_block_exemption#Requesting_and_granting_exemption" title="Wikipedia:IP block exemption">request an IP block exemption</a>. </p> <style data-mw-deduplicate="TemplateStyles:r1214851843">.mw-parser-output .hidden-begin{box-sizing:border-box;width:100%;padding:5px;border:none;font-size:95%}.mw-parser-output .hidden-title{font-weight:bold;line-height:1.6;text-align:left}.mw-parser-output .hidden-content{text-align:left}@media all and (max-width:500px){.mw-parser-output .hidden-begin{width:auto!important;clear:none!important;float:none!important}}</style><div class="hidden-begin mw-collapsible mw-collapsed" style=""><div class="hidden-title skin-nightmode-reset-color" style="text-align:center;">How to appeal if you are confident that your connection does not use a colocation provider's IP address:</div><div class="hidden-content mw-collapsible-content" style=""> If you are confident that you are not using a web host, you may <a href="/wiki/Wikipedia:Appealing_a_block" title="Wikipedia:Appealing a block">appeal this block</a> by adding the following text on your <a href="/wiki/Help:Talk_pages" title="Help:Talk pages">talk page</a>: <code>{{<a href="/wiki/Template:Unblock" title="Template:Unblock">unblock</a>|reason=Caught by a colocation web host block but this host or IP is not a web host. My IP address is _______. <i>Place any further information here.</i> ~~~~}}</code>. <b>You must fill in the blank with your IP address for this block to be investigated.</b> Your IP address can be determined <span class="plainlinks"><b><a class="external text" href="https://en.wikipedia.org/wiki/Wikipedia:Get_my_IP_address?withJS=MediaWiki:Get-my-ip.js">here</a></b></span>. Alternatively, if you wish to keep your IP address private you can use the <a href="/wiki/Wikipedia:Unblock_Ticket_Request_System" title="Wikipedia:Unblock Ticket Request System">unblock ticket request system</a>. There are several reasons you might be editing using the IP address of a web host or colocation provider (such as if you are using VPN software or a business network); please use this method of appeal only if you think your IP address is in fact not a web host or colocation provider.</div></div> <p><span class="sysop-show" style="font-size: 85%;"><span style="border:#707070 solid 1px;background-color:#ffe0e0;padding:2px"><b>Administrators:</b></span> The <a href="/wiki/Wikipedia:IP_block_exemption" title="Wikipedia:IP block exemption">IP block exemption</a> user right should only be applied to allow users to edit using web host in exceptional circumstances, and requests should usually be directed to the functionaries team via email. If you intend to give the IPBE user right, a <a href="/wiki/Wikipedia:CheckUser" title="Wikipedia:CheckUser">CheckUser</a> needs to take a look at the account. This can be requested most easily at <a href="/wiki/Wikipedia:SPI#Quick_CheckUser_requests" class="mw-redirect" title="Wikipedia:SPI">SPI Quick Checkuser Requests</a>. <b>Unblocking</b> an IP or IP range with this template <b>is highly discouraged</b> without at least contacting the blocking administrator.</span> </p> </div></div> </div> <p>This block will expire on 18:23, 24 August 2026. Your current IP address is 8.222.208.146. </p> <div class="paragraphbreak" style="margin-top:0.5em"></div><div style="font-size: 16px;"> <p>Even when blocked, you will <i>usually</i> still be able to edit your <a href="/wiki/Special:MyTalk" title="Special:MyTalk">user talk page</a>, as well as <a href="/wiki/Wikipedia:Emailing_users" title="Wikipedia:Emailing users">email</a> administrators and other editors. </p> </div> <div class="paragraphbreak" style="margin-top:0.5em"></div><div style="font-size: 16px;"> <p>For information on how to proceed, please read the <b><a href="/wiki/Wikipedia:Appealing_a_block#Common_questions" title="Wikipedia:Appealing a block">FAQ for blocked users</a></b> and the <a href="/wiki/Wikipedia:Appealing_a_block" title="Wikipedia:Appealing a block">guideline on block appeals</a>. The <a href="/wiki/Wikipedia:Guide_to_appealing_blocks" title="Wikipedia:Guide to appealing blocks">guide to appealing blocks</a> may also be helpful. </p> </div> <p>Other useful links: <a href="/wiki/Wikipedia:Blocking_policy" title="Wikipedia:Blocking policy">Blocking policy</a> · <a href="/wiki/Help:I_have_been_blocked" title="Help:I have been blocked">Help:I have been blocked</a> </p> </div></li><li class="mw-permissionerror-globalblocking-blockedtext-range"> <div id="mw-blocked-text" style="border: 1px solid #AAA; background-color: var(--background-color-warning-subtle, ivory); color: inherit; padding: 1.5em; width: 100%; box-sizing: border-box;"> <div style="text-align: center;"><span style="font-size: 26px;"><span typeof="mw:File"><a href="/wiki/File:Stop_hand_nuvola.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/en/thumb/f/f1/Stop_hand_nuvola.svg/50px-Stop_hand_nuvola.svg.png" decoding="async" width="50" height="50" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/f/f1/Stop_hand_nuvola.svg/75px-Stop_hand_nuvola.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/f/f1/Stop_hand_nuvola.svg/100px-Stop_hand_nuvola.svg.png 2x" data-file-width="240" data-file-height="240" /></a></span><b> This IP address range has been <a href="https://meta.wikimedia.org/wiki/Global_blocks" class="extiw" title="m:Global blocks">globally blocked</a>.</b></span><br /><span style="font-size: 18px;">This does not affect your ability to <i>read</i> Wikipedia pages.</span></div><div class="paragraphbreak" style="margin-top:0.5em"></div><b>Most people who see this message have done nothing wrong.</b> Some kinds of blocks restrict editing from specific service providers or telecom companies in response to recent abuse or vandalism, and can sometimes affect other users who are unrelated to that abuse. Review the information below for assistance if you do not believe that you have done anything wrong.<div class="paragraphbreak" style="margin-top:0.5em"></div><div class="paragraphbreak" style="margin-top:0.5em"></div> <p>This block affects editing on all Wikimedia wikis. </p><p>The IP address or range 8.222.128.0/17 has been globally <a href="/wiki/Wikipedia:Blocking_policy" title="Wikipedia:Blocking policy">blocked</a> by <a href="/wiki/User:Jon_Kolbert" title="User:Jon Kolbert">Jon Kolbert</a> for the following reason(s): </p> <div style="padding:10px; background:var(--background-color-base, white); color:inherit; border:1px #666 solid;"> <p><a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/NOP" class="extiw" title="m:Special:MyLanguage/NOP">Open proxy/Webhost</a>: See the <a href="https://meta.wikimedia.org/wiki/WM:OP/H" class="extiw" title="m:WM:OP/H">help page</a> if you are affected </p> </div> <p>This block will expire on 15:12, 27 August 2028. Your current IP address is 8.222.208.146. </p> <div class="paragraphbreak" style="margin-top:0.5em"></div><div style="font-size: 16px;"> <p>Even while globally blocked, you will <i>usually</i> still be able to edit pages on <a href="https://meta.wikimedia.org/wiki/" class="extiw" title="m:">Meta-Wiki</a>. </p> </div> <div class="paragraphbreak" style="margin-top:0.5em"></div><div style="font-size: 16px;"> <p>If you believe you were blocked by mistake, you can find additional information and instructions in the <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/No_open_proxies" class="extiw" title="m:Special:MyLanguage/No open proxies">No open proxies</a> global policy. Otherwise, to discuss the block please <a href="https://meta.wikimedia.org/wiki/Steward_requests/Global" class="extiw" title="m:Steward requests/Global">post a request for review on Meta-Wiki</a>. You could also send an email to the <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/Stewards" class="extiw" title="m:Special:MyLanguage/Stewards">stewards</a> <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/VRT" class="extiw" title="m:Special:MyLanguage/VRT">VRT</a> queue at <kbd>stewards@wikimedia.org</kbd> including all above details. </p> </div> <p>Other useful links: <a href="https://meta.wikimedia.org/wiki/Global_blocks" class="extiw" title="m:Global blocks">Global blocks</a> · <a href="/wiki/Help:I_have_been_blocked" title="Help:I have been blocked">Help:I have been blocked</a> </p> </div></li></ul><hr /> <div id="viewsourcetext">You can view and copy the source of this page:</div><textarea readonly="" accesskey="," id="wpTextbox1" cols="80" rows="25" style="" class="mw-editfont-monospace" lang="en" dir="ltr" name="wpTextbox1">{{short description|Method used for display options on video text terminals}} {{Redirect|ANSI code||ANSI (disambiguation)}} {{Use dmy dates|date=May 2021}} {{Infobox character encoding |image=Htop.png |caption=Output of the system-monitor [[htop]], an ncurses-application (which uses {{ctrl|SGR|internal=1}} and other ANSI/ISO control sequences). |name=ANSI X3.64 (ISO/IEC 6429) |standard={{plainlist| * [[Ecma International|ECMA]]-48 * [[ISO/IEC JTC 1|ISO/IEC]] 6429 * [[Federal Information Processing Standards|FIPS]] 86 * [[ANSI]] X3.64 * [[JIS X 0211]]}} |classification=[[ISO/IEC 2022]] based [[C0 and C1 control codes|control code]] and control sequence set |otherrelated={{plainlist| * [[ITU T.61]] * [[ISO/IEC 8613]]-6 / ITU T.416}} {{hr}} Other control function standards: {{hlist|[[Videotex character set|ITU T.101]]|[[JIS X 0207]]|[[ISO 6630]]|[[DIN 31626]]|[[Teletext character set|ETS 300 706]]}} }} '''ANSI escape sequences''' are a standard for [[in-band signaling]] to control cursor location, color, font styling, and other options on video [[text terminal]]s and [[terminal emulator]]s. Certain sequences of [[byte]]s, most starting with an [[Escape character#ASCII escape character|ASCII escape]] character and a [[bracket]] character, are embedded into text. The terminal interprets these sequences as commands, rather than text to display verbatim. ANSI sequences were introduced in the 1970s to replace vendor-specific sequences and became widespread in the computer equipment market by the early 1980s. Although hardware text terminals have become increasingly rare in the 21st century, the relevance of the ANSI standard persists because a great majority of terminal emulators and command consoles interpret at least a portion of the ANSI standard. == History == Almost all manufacturers of video terminals added vendor-specific escape sequences to perform operations such as placing the cursor at arbitrary positions on the screen. One example is the [[VT52]] terminal, which allowed the cursor to be placed at an x,y location on the screen by sending the {{code|ESC}} character, a {{code|Y}} character, and then two characters representing numerical values equal to the x,y location plus 32 (thus starting at the ASCII space character and avoiding the control characters). The [[Hazeltine 1500]] had a similar feature, invoked using {{code|~}}, {{code|DC1}} and then the X and Y positions separated with a comma. While the two terminals had identical functionality in this regard, different control sequences had to be used to invoke them. As these sequences were different for different terminals, elaborate libraries such as [[termcap]] ("terminal capabilities") and utilities such as [[tput]] had to be created so programs could use the same [[application programming interface|API]] to work with any terminal. In addition, many of these terminals required sending numbers (such as row and column) as the binary values of the characters; for some programming languages, and for systems that did not use ASCII internally, it was often difficult to turn a number into the correct character. The ANSI standard attempted to address these problems by making a command set that all terminals would use and requiring all numeric information to be transmitted as ASCII numbers. The first standard in the series was ECMA-48, adopted in 1976.<ref name="ECMA-48 (1979)" /> It was a continuation of a series of character coding standards, the first one being [[ECMA-6]] from 1965, a 7-bit standard from which [[ISO 646]] originates. The name "ANSI escape sequence" dates from 1979 when [[American National Standards Institute|ANSI]] adopted ANSI X3.64. The ANSI X3L2 committee collaborated with the [[Ecma International|ECMA]] committee TC 1 to produce nearly identical standards. These two standards were merged into an international standard, ISO 6429.<ref name="ECMA-48 (1979)" /> In 1994, ANSI withdrew its standard in favor of the international standard. [[File:DEC VT100 terminal.jpg|thumb|The DEC VT100 video display terminal.|alt=DEC VT100 terminal]] The first popular video terminal to support these sequences was the [[Digital Equipment Corporation|Digital]] [[VT100]], introduced in 1978.<ref name="Williams_2006_VT"/> This model was very successful in the market, which sparked a variety of VT100 clones, among the earliest and most popular of which was the much more affordable [[Zenith Z-89|Zenith Z-19]] in 1979.<ref>{{cite web |url=http://www.pestingers.net/Computer_history/Computers_79.htm |title=Heathkit Catalog 1979 |author=Heathkit Company |date=1979 |publisher=Heathkit Company |access-date=2011-11-04 |url-status=dead |archive-url=https://web.archive.org/web/20120113230301/http://www.pestingers.net/Computer_history/Computers_79.htm |archive-date=2012-01-13}}</ref><!-- Document at http://www.retroarchive.org/hardware/heathkit/H19CODES.DOC shows that you "Enter ANSI mode" with ESC <, but does not document the result --><!-- H-19 Esc < switches into ANSI mode, requiring a proprietary ANSI extended escape code to return to VT52 (Heathkit) mode. ~~~~ --> Others included the [[Qume]] QVT-108, [[Televideo]] TVI-970, [[Wyse]] WY-99GT as well as optional "VT100" or "VT103" or "ANSI" modes with varying degrees of compatibility on many other brands. The popularity of these gradually led to more and more software (especially [[bulletin board system]]s and other [[online service]]s) assuming the escape sequences worked, leading to almost all new terminals and emulator programs supporting them. In 1981, ANSI X3.64 was adopted for use in the US government by [[Federal Information Processing Standards|FIPS]] publication 86. Later, the US government stopped duplicating industry standards, so FIPS pub. 86 was withdrawn.<ref>{{cite web|url=https://www.nist.gov/system/files/documents/2016/12/15/withdrawn_fips_by_numerical_order_index.pdf|title=Withdrawn FIPS Listed by Number|date=15 December 2016|website=[[National Institute of Standards and Technology]]|access-date=2 January 2022}}</ref> ECMA-48 has been updated several times and is currently at its 5th edition, from 1991. It is also adopted by [[International Organization for Standardization|ISO]] and [[International Electrotechnical Commission|IEC]] as standard '''ISO/IEC 6429'''.<ref name="ECMA-48"/> A version is adopted as a [[Japanese Industrial Standard]], as [[JIS X 0211]]. Related standards include [[ITU T.61]], the [[Teletex]] standard, and the '''ISO/IEC 8613''', the [[Open Document Architecture]] standard (mainly ISO/IEC 8613-6 or ITU T.416). The two systems share many escape codes with the ANSI system, with extensions that are not necessarily meaningful to computer terminals. Both systems quickly fell into disuse, but ECMA-48 does mark the extensions used in them as reserved. == Platform support == [[File:XtermMenus.png|thumb|The Xterm terminal emulator.|alt=Xterm terminal emulator]]In the early 1980s, large amounts of software directly used these sequences to update screen displays. This included everything on [[OpenVMS|VMS]] (which assumed DEC terminals), most software designed to be portable on [[CP/M]] home computers, and even lots of Unix software as it was easier to use than the termcap libraries, such as the shell script examples below in this article. [[Terminal emulator]]s for communicating with remote machines almost always implement ANSI escape codes. This includes anything written to communicate with bulletin-board systems on home and personal computers. On Unix terminal emulators such as [[xterm]] also can communicate with software running on the same machine, and thus software running in X11 under a terminal emulator could assume the ability to write these sequences. As computers got more powerful even built-in displays started supporting them, allowing software to be portable between CP/M systems. There were attempts to extend the escape sequences to support printers<ref>{{cite web |url=http://wiki.amigaos.net/wiki/Printer_Device#Printer_Command_Definitions |title=Amiga Printer Command Definitions |publisher=Commodore |access-date=2013-07-10}}</ref> and as an early PDF-like document storage format, the [[Open Document Architecture]].{{cn|date=November 2023}} === DOS and Windows === The IBM PC, introduced in 1983, did not support these or any other escape sequences for updating the screen. Only a few [[control character]]s ([[BEL (ASCII)|BEL]], [[CR (ASCII)|CR]], [[LF (ASCII)|LF]], [[BS (ASCII)|BS]]) were interpreted by the underlying BIOS.<!-- INT 10h/AH=0Eh --> Any display effects had to be done with BIOS calls, which were notoriously slow, or by directly manipulating the IBM PC hardware. This made any interesting software non-portable and led to the need to duplicate details of the display hardware in [[IBM PC compatible|PC Clone]]s. DOS version 2.0 included an optional [[device driver]] named {{mono|[[ANSI.SYS]]}}. Poor performance, and the fact that it was not installed by default, meant software rarely (if ever) took advantage of it. The [[Windows Console]] did not support ANSI escape sequences, nor did Microsoft provide any method to enable them. Some replacements such as JP Software's [[Take Command Console|TCC]] (formerly 4NT), Michael J. Mefford's ANSI.COM, Jason Hood's {{mono|ANSICON}}<ref name="Ansicon">{{cite web |url=https://github.com/adoxa/ansicon |title=Process ANSI escape sequences for Windows console programs |publisher=Jason Hood's Home page |author-first=Jason |author-last=Hood |date=2005 |access-date=2013-05-09 }}</ref> and Maximus5's [[ConEmu]] enabled ANSI escape sequences. Software such as the Python colorama package<ref>{{cite web |url=https://pypi.python.org/pypi/colorama |title=colorama · PyPI |work=Python Package Index |access-date=2022-02-27}}</ref> or [[Cygwin]] modified text in-process as it was sent to the console, extracting the ANSI Escape sequences and emulating them with Windows calls. In 2016, Microsoft released the [[Windows 10]] [[Windows 10 version history#Version 1511 (November Update)|version 1511]] update which unexpectedly implemented support for ANSI escape sequences, over three decades after the debut of Windows.<ref>{{Cite web|url=https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences|title=Console Virtual Terminal Sequences - Windows Console|last=bitcrazed|website=docs.microsoft.com|language=en-us|access-date=2018-05-30}}</ref> This was done alongside [[Windows Subsystem for Linux]], apparently to allow [[Unix-like]] terminal-based software to use the Windows Console. Windows PowerShell 5.1 enabled this by default, and PowerShell 6 made it possible to embed the necessary ESC character into a string with {{code|`e}}.<ref>{{cite web|url=https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_special_characters?view=powershell-6|title=PowerShell Help: About Special Characters|date=12 January 2023 }}</ref> [[Windows Terminal]], introduced in 2019, supports the sequences by default, and Microsoft intends to replace the Windows Console with Windows Terminal.<ref name="ms-console-roadmap">{{cite web |url = https://docs.microsoft.com/en-us/windows/console/ecosystem-roadmap#roadmap-for-the-future |title = Windows Console and Terminal Ecosystem Roadmap |publisher = Microsoft |date = 2018 |access-date = 2021-03-13 | quote=this includes retiring the classic console host user interface from its default position in favor of Windows Terminal, ConPTY, and virtual terminal sequences. }}</ref> == C0 control codes == Almost all users assume some functions of some single-byte characters. Initially defined as part of ASCII, the default C0 control code set is now defined in ISO 6429 (ECMA-48), making it part of the same standard as the C1 set invoked by the ANSI escape sequences (although [[ISO 2022]] allows the ISO 6429 C0 set to be used without the ISO 6429 C1 set, and ''vice versa'', provided that 0x1B is always ESC). This is used to shorten the amount of data transmitted, or to perform some functions that are unavailable from escape sequences: {| class="wikitable" |+ Popular C0 control codes (not an exhaustive list) |- ! [[Caret notation|^]] !!C0!!Abbr!!Name!!Effect |- id=BEL | {{tt|^G}} || 0x07 || {{tt|BEL}} || Bell || Makes an audible noise. |- id=BS | {{tt|^H}} || 0x08 || {{tt|BS}} || Backspace || Moves the cursor left (but may "backwards wrap" if cursor is at start of line). |- id=HT | {{tt|^I}} || 0x09 || {{tt|HT}} || Tab || Moves the cursor right to next tab stop. |- id=LF | {{tt|^J}} || 0x0A || {{tt|LF}} || Line Feed || Moves to next line, scrolls the display up if at bottom of the screen. Usually does not move horizontally, though programs should not rely on this. |- id=FF | {{tt|^L}} || 0x0C || {{tt|FF}} || Form Feed || Move a printer to top of next page. Usually does not move horizontally, though programs should not rely on this. Effect on video terminals varies. |- id=CR | {{tt|^M}} || 0x0D || {{tt|CR}} || {{nobr|Carriage Return}} || Moves the cursor to column zero. |- id=ESC | {{tt|^[}} || 0x1B || {{tt|{{visible anchor|ESC}}}} || Escape || Starts all the escape sequences |} Escape sequences vary in length. The general format for an ANSI-compliant escape sequence is defined by [[ANSI X3.41]] (equivalent to ECMA-35 or ISO/IEC 2022).<ref name="ECMA-35"/>{{Rp|13.1}} The escape sequences consist only of bytes in the range {{tt|0x20—0x7F}} (all the non-control ASCII characters), and can be parsed without looking ahead. The behavior when a control character, a byte with the high bit set, or a byte that is not part of any valid sequence, is encountered before the end is undefined. == Fe Escape sequences == If the [[#ESC|{{code|ESC}}]] is followed by a byte in the range 0x40 to 0x5F, the escape sequence is of type {{code|Fe}}. Its interpretation is delegated to the applicable [[C0 and C1 control codes|C1 control code]] standard.<ref name="ECMA-35"/>{{Rp|13.2.1}} Accordingly, all escape sequences corresponding to C1 control codes from ANSI X3.64 / ECMA-48 follow this format.<ref name="ECMA-48"/>{{Rp|5.3.a}} The standard says that, in 8-bit environments, the control functions corresponding to type {{code|Fe}} escape sequences (those from the set of [[C1 control codes]]) can be represented as single bytes in the 0x80–0x9F range.<ref name="ECMA-48"/>{{Rp|5.3.b}} This is possible in character encodings conforming to the provisions for an 8-bit code made in ISO 2022, such as the [[ISO 8859]] series. However, in character encodings used on modern devices such as [[UTF-8]] or [[CP-1252]], those codes are often used for other purposes, so only the 2-byte sequence is typically used. In the case of UTF-8, representing a C1 control code via the [[C1 Controls and Latin-1 Supplement]] block results in a different two-byte code (e.g. {{tt|0xC2,0x8E}} for {{tt|U+008E}}), but no space is saved this way. {| class="wikitable" |+ Some type {{tt|Fe}} (C1 set element) ANSI escape sequences (not an exhaustive list) |- ! Code!!C1!!Abbr!!Name!!Effect |- id=SS2 | {{tt|ESC N}} | {{tt|0x8E}} | {{tt|SS2}} | Single Shift Two | rowspan=2 | Select a single character from one of the [[ISO/IEC 2022#Code structure|alternative character sets]]. SS2 selects the G2 character set, and SS3 selects the G3 character set.<ref name="xtc"/> In a 7-bit environment, this is followed by one or more GL bytes (0x20–0x7F) specifying a character from that set.<ref name="ECMA-35"/>{{Rp|9.4}} In an 8-bit environment, these may instead be GR bytes (0xA0–0xFF).<ref name="ECMA-35"/>{{Rp|8.4}} |- id=SS3 | {{nobr|{{tt|ESC O}}}} | {{tt|0x8F}} | {{tt|SS3}} | Single Shift Three |- id=DCS | {{tt|ESC P}} | {{tt|0x90}} | {{tt|DCS}} | Device Control String | Terminated by ST.<ref name="ECMA-48"/>{{Rp|5.6}} Xterm's uses of this sequence include defining User-Defined Keys, and requesting or setting Termcap/Terminfo data.<ref name="xtc"/> |- id=CSI | {{tt|ESC [}} | {{tt|0x9B}} | {{tt|CSI}} | [[#CSIsection|Control Sequence Introducer]] | Starts most of the useful sequences, terminated by a byte in the range 0x40 through 0x7E.<ref name="ECMA-48"/>{{Rp|5.4}} |- id=ST | {{tt|ESC \}} | {{tt|0x9C}} | {{tt|ST}} | String Terminator | Terminates strings in other controls.<ref name="ECMA-48"/>{{Rp|8.3.143}} |- | {{tt|ESC ]}} | {{tt|0x9D}} | {{tt|OSC}} | [[#OSC|Operating System Command]] | Starts a control string for the operating system to use, terminated by ST.<ref name="ECMA-48"/>{{Rp|8.3.89}} |- id=SOS | {{tt|ESC X}} | {{tt|0x98}} | {{tt|SOS}} | Start of String | rowspan=3 | Takes an argument of a string of text, terminated by ST.<ref name="ECMA-48"/>{{Rp|5.6}} The uses for these string control sequences are defined by the application<ref name="ECMA-48"/>{{Rp|8.3.2,8.3.128}} or privacy discipline.<ref name="ECMA-48"/>{{Rp|8.3.94}} These functions are rarely implemented and the arguments are ignored by xterm.<ref name="xtc"/> Some [[Kermit (protocol)|Kermit]] clients allow the server to automatically execute Kermit commands on the client by embedding them in APC sequences; this is a potential security risk if the server is untrusted.<ref name="CruzGianone1997">{{cite book|author1=Frank da Cruz|author2=Christine Gianone|title=Using C-Kermit|url=https://books.google.com/books?id=QuYQPc-c67MC&pg=PA278|year=1997|publisher=Digital Press|isbn=978-1-55558-164-0|page=278}}</ref> |- id=PM | {{tt|ESC ^}} | {{tt|0x9E}} | {{tt|PM}} | Privacy Message |- id=APC | {{tt|ESC _}} | {{tt|0x9F}} | {{tt|APC}} | {{nobr|Application Program Command}} |} <!-- Parked a number of anchors here which are used in redirects to this page but are not yet discussed inhere. Move them a better place when the corresponding info gets incorporated here at a later stage --> {{anchor|CBT|CCH|CHT|CTC|CVT}} {{anchor|DA|DAQ|DCH|DL|DMI|EA|ECH|EF|EMI}} {{anchor|EPA|ESA|FNT|GSM|GSS|HPA|HPR|HTJ|HTS|ICH}} {{anchor|IL|IND|INT|JFY|MC|MW|NEL|NP|PLD}} {{anchor|PLU|PP|PU1|PU2|QUAD|REP|RI|RIS|RM}} {{anchor|SEM|SL|SM|SPA|SPI|SR|SSA}} {{anchor|STS|TBC|TSS|VPA|VPR|VTS}} {{anchor|SKR|KR}} == {{anchor|CSIsection}} Control Sequence Introducer commands == For Control Sequence Introducer, or CSI, commands, the {{code|ESC [}} (written as {{code|\e[}} or {{code|\033[}} in several programming languages) is followed by any number (including none) of "parameter bytes" in the range 0x30–0x3F (ASCII <code>0–9:;<=>?</code>), then by any number of "intermediate bytes" in the range 0x20–0x2F (ASCII space and {{code|!"#$%&'()*+,-./}}), then finally by a single "final byte" in the range 0x40–0x7E (ASCII <code>@A–Z[\]^_`a–z{|}~</code><!--Note: can't use {{code}} due to the | in the content.-->).<ref name="ECMA-48"/>{{Rp|5.4}} All common sequences just use the parameters as a series of semicolon-separated numbers such as {{code|1;2;3}}.<ref name="ECMA-48" />{{Rp|page=5.4.2}} Missing numbers are treated as {{code|0}} ({{code|1;;3}} acts like the middle number is {{code|0}}, and no parameters at all in {{code|ESC[m}} acts like a {{code|0}} reset code). Some sequences (such as CUU) treat {{code|0}} as {{code|1}} in order to make missing parameters useful.<ref name="ECMA-48"/>{{Rp|F.4.2}} A subset of arrangements was declared "private" so that terminal manufacturers could insert their own sequences without conflicting with the standard. Sequences containing the parameter bytes <code><=>?</code> or the final bytes 0x70–0x7E (<code>p–z{|}~</code>) are private. The behavior of the terminal is undefined in the case where a CSI sequence contains any character outside of the range 0x20–0x7E. These illegal characters are either C0 control characters (the range 0–0x1F), DEL (0x7F), or bytes with the high bit set. Possible responses are to ignore the byte, to process it immediately, and furthermore whether to continue with the CSI sequence, to abort it immediately, or to ignore the rest of it.{{Citation needed|date=July 2015}} {| class="wikitable" |+ Some ANSI control sequences (not an exhaustive list) |- ! Code!!Abbr!!Name!!Effect |- id=CUU | style="font-family:monospace;" | CSI {{var|n}} A | {{tt|CUU}} | Cursor Up | rowspan=4 | Moves the cursor {{var|n}} (default {{code|1}}) cells in the given direction. If the cursor is already at the edge of the screen, this has no effect. |- id=CUD | style="font-family:monospace;" | CSI {{var|n}} B | {{tt|CUD}} | Cursor Down |- id=CUF | style="font-family:monospace;" | CSI {{var|n}} C | {{tt|CUF}} | Cursor Forward |- id=CUB | style="font-family:monospace;" | CSI {{var|n}} D | {{tt|CUB}} | Cursor Back |- id=CNL | style="font-family:monospace;" | CSI {{var|n}} E | {{tt|CNL}} | Cursor Next Line | Moves cursor to beginning of the line {{var|n}} (default {{code|1}}) lines down. (not [[ANSI.SYS]]) |- id=CPL | style="font-family:monospace;" | CSI {{var|n}} F | {{tt|CPL}} | Cursor Previous Line | Moves cursor to beginning of the line {{var|n}} (default {{code|1}}) lines up. (not [[ANSI.SYS]]) |- id=CHA | style="font-family:monospace;" | CSI {{var|n}} G | {{tt|CHA}} | {{nobr|Cursor Horizontal Absolute}} | Moves the cursor to column {{var|n}} (default {{code|1}}). (not [[ANSI.SYS]]) |- id=CUP | style="font-family:monospace;" | CSI&nbsp;{{var|n}}&nbsp;;&nbsp;{{var|m}}&nbsp;H | {{tt|CUP}} | Cursor Position | Moves the cursor to row {{var|n}}, column {{var|m}}. The values are 1-based, and default to {{code|1}} (top left corner) if omitted. A sequence such as {{code|CSI ;5H}} is a synonym for {{code|CSI 1;5H}} as well as {{code|CSI 17;H}} is the same as {{code|CSI 17H}} and {{code|CSI 17;1H}} |- id=ED | style= "font-family:monospace;" | CSI {{var|n}} J | {{tt|ED}} | Erase in Display | Clears part of the screen. If {{var|n}} is {{code|0}} (or missing), clear from cursor to end of screen. If {{var|n}} is {{code|1}}, clear from cursor to beginning of the screen. If {{var|n}} is {{code|2}}, clear entire screen (and moves cursor to upper left on DOS [[ANSI.SYS]]). If {{var|n}} is {{code|3}}, clear entire screen and delete all lines saved in the scrollback buffer (this feature was added for [[xterm]] and is supported by other terminal applications). |- id=EL | style="font-family:monospace;" | CSI {{var|n}} K | {{tt|EL}} | Erase in Line | Erases part of the line. If {{var|n}} is {{code|0}} (or missing), clear from cursor to the end of the line. If {{var|n}} is {{code|1}}, clear from cursor to beginning of the line. If {{var|n}} is {{code|2}}, clear entire line. Cursor position does not change. |- id=SU | style="font-family:monospace;" | CSI {{var|n}} S | {{tt|SU}} | Scroll Up | Scroll whole page up by {{var|n}} (default {{code|1}}) lines. New lines are added at the bottom. (not [[ANSI.SYS]]) |- id=SD | style="font-family:monospace;" | CSI {{var|n}} T | {{tt|SD}} | Scroll Down | Scroll whole page down by {{var|n}} (default {{code|1}}) lines. New lines are added at the top. (not [[ANSI.SYS]]) |- id=HVP | style="font-family:monospace;" | CSI {{var|n}} ; {{var|m}} f | {{tt|HVP}} | {{nobr|Horizontal Vertical Position}} | Same as CUP, but counts as a format effector function (like {{control code link|CR}} or {{control code link|LF}}) rather than an editor function (like CUD or CNL). This can lead to different handling in certain terminal modes.<ref name="ECMA-48" />{{Rp|Annex A}} |- | style="font-family:monospace;" | CSI {{var|n}} m | {{tt|SGR}} | [[#SGR|Select Graphic Rendition]] | Sets colors and style of the characters following this code |- id=AUX | style="font-family:monospace;" | CSI 5i | | AUX Port On | Enable aux serial port usually for local serial printer |- id=noAUX | style="font-family:monospace;" | CSI 4i | | AUX Port Off | Disable aux serial port usually for local serial printer {{anchor|CPR}} |- id=DSR | style="font-family:monospace;" | CSI 6n | {{tt|DSR}} | Device Status Report | Reports the cursor position (CPR) by transmitting {{code|ESC[n;mR}}, where {{var|n}} is the row and {{var|m}} is the column. |} {| class="wikitable" |+ Some popular private sequences |- ! Code!!Abbr!!Name!!Effect |- id=SCP | style="font-family:monospace;" | CSI s | {{tt|SCP, SCOSC}} | Save Current Cursor Position | Saves the cursor position/state in SCO console mode.<ref>{{cite web |url=https://vt100.net/docs/vt510-rm/SCOSC.html |title=SCOSC—Save Current Cursor Position |publisher=[[Digital Equipment Corporation|DEC]] |work=VT510 Video Terminal Programmer Information}}</ref> In vertical split screen mode, instead used to set (as <code>CSI <var>n</var> ; <var>n</var> s</code>) or reset left and right margins.<ref>{{cite web |url=https://vt100.net/docs/vt510-rm/DECSLRM.html |title=DECSLRM—Set Left and Right Margins |publisher=[[Digital Equipment Corporation|DEC]] |work=VT510 Video Terminal Programmer Information}}</ref> |- id=RCP | style="font-family:monospace;" | CSI u | {{tt|RCP, SCORC}} | {{nobr|Restore Saved Cursor Position}} | Restores the cursor position/state in SCO console mode.<ref>{{cite web |url=https://vt100.net/docs/vt510-rm/SCORC.html |title=SCORC—Restore Saved Cursor Position |publisher=[[Digital Equipment Corporation|DEC]] |work=VT510 Video Terminal Programmer Information}}</ref> |- | style="font-family:monospace;" | CSI ? 25 h | {{tt|DECTCEM}} | | Shows the cursor, from the [[VT220]]. |- | style="font-family:monospace;" | CSI ? 25 l | {{tt|DECTCEM}} | | Hides the cursor. |- | style="font-family:monospace;" | CSI ? 1004 h | | | Enable reporting focus. Reports whenever terminal emulator enters or exits focus as {{code|ESC [I}} and {{code|ESC [O}}, respectively. |- | style="font-family:monospace;" | CSI ? 1004 l | | | Disable reporting focus. |- | style="font-family:monospace;" | CSI ? 1049 h | | | Enable alternative screen buffer, from xterm |- | style="font-family:monospace;" | CSI ? 1049 l | | | Disable alternative screen buffer, from xterm |- | style="font-family:monospace;" | CSI&nbsp;?&nbsp;2004&nbsp;h | | | Turn on bracketed paste mode.<ref>{{cite web |first1=Edward |last1=Moy |first2=Stephen |last2=Gildea |first3=Thomas | last3=Dickey |title=XTerm Control Sequences |url=https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_ |at=Functions using CSI, ordered by the final character(s) |access-date=4 February 2022}}</ref> In bracketed paste mode, text pasted into the terminal will be surrounded by {{code|ESC [200~}} and {{code|ESC [201~}}; programs running in the terminal should not treat characters bracketed by those sequences as commands ([[Vim (text editor)|Vim]], for example, does not treat them as commands).<ref>{{cite web|url=https://cirw.in/blog/bracketed-paste|title=bracketed paste mode|author=Conrad Irwin|date=April 2013|website=cirw.in}}</ref> From xterm<ref>{{cite web |first1=Edward |last1=Moy |first2=Stephen |last2=Gildea |first3=Thomas | last3=Dickey |title=XTerm Control Sequences |url=https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Bracketed-Paste-Mode |at=Bracketed Paste Mode |access-date=4 February 2022}}</ref> |- | style="font-family:monospace;" | CSI ? 2004 l | | | Turn off bracketed paste mode. |} == {{anchor|SGR}} Select Graphic Rendition parameters == The control sequence <code>CSI {{var|n}} m</code>, named Select Graphic Rendition (SGR), sets display attributes. Several attributes can be set in the same sequence, separated by semicolons.<ref name="console_codes(4)">{{Cite web|url=http://man7.org/linux/man-pages/man4/console_codes.4.html|title=console_codes(4) - Linux manual page|website=man7.org|access-date=2018-03-23}}</ref> Each display attribute remains in effect until a following occurrence of SGR resets it.<ref name="ECMA-48" /> If no codes are given, {{code|CSI m}} is treated as {{code|CSI 0 m}} (reset / normal). {| class="wikitable" ! ''n''!! Name !! Note |- | {{tt|0}} | Reset ''or'' normal | All attributes become turned off |- | {{tt|1}} | Bold or increased intensity | As with faint, the color change is a PC (SCO / [[Color Graphics Adapter|CGA]]) invention.<ref name=SCO>{{cite web |title=screen(HW) |url=http://osr507doc.sco.com/man/html.HW/screen.HW.html |website=SCO OpenServer Release 5.0.7 Manual |date=11 February 2003}}</ref>{{better source needed|date=June 2020}} |- | {{tt|2}} | Faint, decreased intensity, ''or'' dim |<!-- dim (with a saturated color). --> May be implemented as a light [[font weight]] like bold.<ref>{{cite web |title=Bug 791596 – Thoughts about faint (SGR 2) |url=https://bugzilla.gnome.org/show_bug.cgi?id=791596 |website=bugzilla.gnome.org}}</ref> |- | {{tt|3}} | Italic | Not widely supported. Sometimes treated as inverse or blink.<ref name=SCO/> |- | {{tt|4}} | Underline | Style extensions exist for Kitty, VTE, mintty, iTerm2 and Konsole.<ref name=color-u>{{cite web |title=Curly and colored underlines (#6382) · Issues · George Nachman / iterm2 |url=https://gitlab.com/gnachman/iterm2/-/issues/6382 |website=GitLab |date=11 December 2017 |language=en}}</ref><ref name=color-u-kitty-spec>{{cite web |title=Extensions to the xterm protocol |url=https://sw.kovidgoyal.net/kitty/protocol-extensions.html#colored-and-styled-underlines |website=kitty documentation |language=en |access-date=2020-07-01}}</ref><ref name=color-u-konsole>{{cite web |title=Curly and colored underlines |url=https://bugs.kde.org/387811 |website=KDE bugtracker |date=27 August 2022 |language=en}}</ref> |- | {{tt|5}} | Slow blink | Sets blinking to less than 150 times per minute |- | {{tt|6}} | Rapid blink | MS-DOS ANSI.SYS, 150+ per minute; not widely supported |- | {{tt|7}} | [[Reverse video]] ''or'' invert | Swap foreground and background colors; inconsistent emulation<ref name=console-termio-realize>{{cite web |title=console-termio-realizer |url=http://jdebp.uk/Softwares/nosh/guide/commands/console-termio-realizer.xml |website=jdebp.uk}}</ref>{{dubious|inconsistent emulation|date=April 2023}} |- | {{tt|8}} | Conceal ''or'' hide | Not widely supported. |- | {{tt|9}} | [[Strikethrough|Crossed-out]], ''or'' strike | Characters legible but marked as if for deletion. Not supported in Terminal.app. |- | {{tt|10}} | Primary (default) font | |- | {{tt|11–19}} | Alternative font | Select alternative font {{math|''n'' − 10}} |- | {{tt|20}} | [[Fraktur]] (Gothic) | Rarely supported |- | {{tt|21}} | Doubly underlined; or: not bold | Double-underline per ECMA-48,<ref name="ECMA-48" />{{Rp|8.3.117}} but instead disables bold intensity on several terminals, including in the [[Linux kernel]]'s [[Linux console|console]] before version 4.17.<ref>{{cite web |url=https://man7.org/linux/man-pages/man4/console_codes.4.html |title=console_codes(4) |work=Linux Programmer's Manual |publisher=Linux [[man (Unix)|man-pages]] project |version=5.10}}</ref> |- | {{tt|22}} | Normal intensity | Neither bold nor faint; color changes where intensity is implemented as such. |- | {{tt|23}} | Neither italic, nor blackletter | |- | {{tt|24}} | Not underlined | Neither singly nor doubly underlined |- | {{tt|25}} | Not blinking |Turn blinking off |- | {{tt|26}} | Proportional spacing | [[ITU T.61]] and T.416, not known to be used on terminals |- | {{tt|27}} | Not reversed | |- | {{tt|28}} | Reveal | Not concealed |- | {{tt|29}} | Not crossed out | |- | {{tt|30–37}} | Set foreground [[#3-bit and 4-bit|color]] | |- | {{tt|38}} | Set foreground [[#8-bit|color]] | [[#8-bit|Next arguments are {{code|5;n}} or {{code|2;r;g;b}}]] |- | {{tt|39}} | Default foreground color | Implementation defined (according to standard) |- | {{tt|40–47}} | Set background [[#3-bit and 4-bit|color]] | |- | {{tt|48}} | Set background [[#8-bit|color]] | [[#8-bit|Next arguments are {{code|5;n}} or {{code|2;r;g;b}}]] |- | {{tt|49}} | Default background color | Implementation defined (according to standard) |- | {{tt|50}} | Disable proportional spacing | T.61 and T.416 |- | {{tt|51}} | Framed | rowspan=2| Implemented as "[[Variation Selectors (Unicode block)|emoji variation selector]]" in mintty.<ref name="mintty">{{cite web |title=mintty/mintty: Text attributes and rendering |url=https://github.com/mintty/mintty/wiki/Tips#text-attributes-and-rendering |website=GitHub |language=en}}</ref> |- | {{tt|52}} | Encircled |- | {{tt|53}} | Overlined | Not supported in Terminal.app |- | {{tt|54}} | Neither framed nor encircled | |- | {{tt|55}} | Not overlined | |- | {{tt|58}} | Set underline [[#8-bit|color]] | Not in standard; implemented in Kitty, VTE, mintty, and iTerm2.<ref name=color-u/><ref name=color-u-kitty-spec/> [[#8-bit|Next arguments are {{code|5;n}} or {{code|2;r;g;b}}]]. |- | {{tt|59}} | Default underline color | Not in standard; implemented in Kitty, VTE, mintty, and iTerm2.<ref name=color-u/><ref name=color-u-kitty-spec/> |- | {{tt|60}} | Ideogram underline or right side line | rowspan="5"| Rarely supported |- | {{tt|61}} | Ideogram double underline, ''or'' double line on the right side |- | {{tt|62}} | Ideogram overline or left side line |- | {{tt|63}} | Ideogram double overline, ''or'' double line on the left side |- | {{tt|64}} | Ideogram stress marking |- | {{tt|65}} | No ideogram attributes | Reset the effects of all of {{code|60}}–{{code|64}} |- | {{tt|73}} | Superscript | rowspan=3| Implemented only in mintty<ref name="mintty"/> |- | {{tt|74}} | Subscript |- | {{tt|75}} | Neither superscript nor subscript |- | {{tt|90–97}} | Set bright foreground color | rowspan=2| Not in standard; originally implemented by aixterm<ref name="xtc"/> |- | {{tt|{{nobr|100–107}}}} | Set bright background color |} <!-- SGR 9x and 10x are not defined in ISO 6429, etc. They were defined for IBM's aixterm, and are used in xterm. The names given for the SGR codes are not normative from the ISO/IEC 6429, nor ECMA 48, nor ANSI X3.64. Rather, they are subjectively descriptive. Room for improvement. --> === {{anchor|colors}} Colors === ==== 3-bit and 4-bit ==== The original specification only had 8 colors, and just gave them names. The SGR parameters 30–37 selected the foreground color, while 40–47 selected the background. Quite a few terminals implemented "bold" (SGR code 1) as a brighter color rather than a different font, thus providing 8 additional foreground colors. Usually you could not get these as background colors, though sometimes inverse video (SGR code 7) would allow that. Examples: to get black letters on white background use {{code|ESC[30;47m}}, to get red use {{code|ESC[31m}}, to get bright red use {{code|ESC[1;31m}}. To reset colors to their defaults, use {{code|ESC[39;49m}} (not supported on some terminals), or reset all attributes with {{code|ESC[0m}}. Later terminals added the ability to directly specify the "bright" colors with 90–97 and 100–107. The chart below shows a few examples of how VGA standard and modern [[terminal emulator]]s translate the 4-bit color codes into 24-bit color codes. <div style="display: flex; width: 100%; overflow-x: auto"> {| class="wikitable" |- ! {{abbr|FG|Foreground}} ! {{abbr|BG|Background}} ! Name ! VGA{{ efn | Typical colors that are used when booting PCs and leaving them in text mode, which used a 16-entry color table. The colors are different in the EGA/VGA graphic modes. }} ! [[Windows Console|Windows&nbsp;XP<br/>Console]]{{ efn | Seen in Windows XP through Windows 8.1 }} ! [[Windows PowerShell|Windows<br/>PowerShell&<br/>1.0–6.0]]{{ efn | PowerShell's default shortcut [[.lnk]], unchanged for over a decade, remaps yellow and magenta to give PowerShell distinctive foreground/background colors compared to the Command Prompt.<ref>{{Cite web |title=default shortcut on Windows remaps ANSI colors 35,36 · Issue #4266 · PowerShell/PowerShell |url=https://github.com/PowerShell/PowerShell/issues/4266 |access-date=2022-12-21 |website=GitHub |language=en}}</ref> PowerShell&nbsp;7 is unaffected.}} ! [[Visual Studio Code]]{{efn|Debug console, "Dark+" theme}} ! [[Windows Console|Windows&nbsp;10<br/>Console]]{{efn | Campbell theme, used as of Windows 10 version 1709.}} ! [[Terminal (macOS)|Terminal.app]] ! [[PuTTY]] ! [[mIRC]] ! [[xterm]] ! [[Ubuntu (operating system)|Ubuntu]]{{efn | For virtual terminals, from /etc/vtrgb.}} !Eclipse Terminal |- | {{tt|30}} || {{tt|40}} || Black | colspan="4" style="background: #000; color: white" | 0,{{nnbsp}}0,{{nnbsp}}0 | style="background: #0c0c0c; color: white" | 12,{{nnbsp}}12,{{nnbsp}}12 | colspan="4" style="background: #000; color: white" | 0,{{nnbsp}}0,{{nnbsp}}0 | style="background: #010101; color: white" | 1,{{nnbsp}}1,{{nnbsp}}1 | style="background: #000; color: white" | 0,{{nnbsp}}0,{{nnbsp}}0 |- | {{tt|31}} || {{tt|41}} || Red | style="background: #AA0000; color: white" | 170,{{nnbsp}}0,{{nnbsp}}0 | colspan="2" style="background: #800000; color: white" | 128,{{nnbsp}}0,{{nnbsp}}0 | style="background: #cd3131; color: white" | 205, 49, 49 | style="background: #c50f1f; color: white" | 197,{{nnbsp}}15,{{nnbsp}}31 | style="background: #990000; color: white" | 153,{{nnbsp}}0,{{nnbsp}}0 | style="background: #bb0000; color: white" | 187,{{nnbsp}}0,{{nnbsp}}0 | style="background: #7f0000; color: white" | 127,{{nnbsp}}0,{{nnbsp}}0 | style="background: #cd0000; color: white" | 205,{{nnbsp}}0,{{nnbsp}}0 | style="background: #de382b; color: white" | 222,{{nnbsp}}56,{{nnbsp}}43 | style="background: #cd0000; color: white" | 205,{{nnbsp}}0,{{nnbsp}}0 |- | {{tt|32}} || {{tt|42}} || Green | style="background: #00AA00; color: white" | 0,{{nnbsp}}170,{{nnbsp}}0 | colspan="2" style="background: #008000; color: white" | 0,{{nnbsp}}128,{{nnbsp}}0 | style="background: #0dbc79; color: white" | 13, 188, 121 | style="background: #13a10e; color: white" | 19,{{nnbsp}}161,{{nnbsp}}14 | style="background: #00A600; color: white" | 0,{{nnbsp}}166,{{nnbsp}}0 | style="background: #00bb00; color: white" | 0,{{nnbsp}}187,{{nnbsp}}0 | style="background: #009300; color: white" | 0,{{nnbsp}}147,{{nnbsp}}0 | style="background: #00cd00; color: white" | 0,{{nnbsp}}205,{{nnbsp}}0 | style="background: #39b54a; color: black" | 57,{{nnbsp}}181,{{nnbsp}}74 | style="background: #00cd00; color: white" | 0,{{nnbsp}}205,{{nnbsp}}0 |- | {{tt|33}} || {{tt|43}} || Yellow | style="background: #AA5500; color: white" | 170,{{nnbsp}}85,{{nnbsp}}0{{ efn | On terminals based on [[Color Graphics Adapter|CGA]] compatible hardware, such as ANSI.SYS running on DOS, this normal intensity foreground color is rendered as orange. CGA [[Color Graphics Adapter#With an RGBI monitor|RGBI]] monitors contained hardware to modify the dark yellow color to an orange/brown color by reducing the green component<ref>{{cite web|url=https://int10h.org/blog/2022/06/ibm-5153-color-true-cga-palette/|title=The IBM 5153's True CGA Palette and Color Output|publisher=VileR|date=2022-06-11|access-date=2024-05-18}}</ref> }} | style="background: #808000; color: white" | 128,{{nnbsp}}128,{{nnbsp}}0 | style="background: #eeedf0; color: black" | 238,{{nnbsp}}237,{{nnbsp}}240 | style="background: #e5e510; color: black" | 229, 229, 16 | style="background: #c19c00; color: white" | 193,{{nnbsp}}156,{{nnbsp}}0 | style="background: #999900; color: white" | 153,{{nnbsp}}153,{{nnbsp}}0 | style="background: #bbbb00; color: black" | 187,{{nnbsp}}187,{{nnbsp}}0 | style="background: #fc7f00; color: white" | 252,{{nnbsp}}127,{{nnbsp}}0 | style="background: #cdcd00; color: black" | 205,{{nnbsp}}205,{{nnbsp}}0 | style="background: #ffc706; color: black" | 255,{{nnbsp}}199,{{nnbsp}}6 | style="background: #cdcd00; color: black" | 205,{{nnbsp}}205,{{nnbsp}}0 |- | {{tt|34}} || {{tt|44}} || Blue | style="background: #0000AA; color: white" | 0,{{nnbsp}}0,{{nnbsp}}170 | colspan="2" style="background: #000080; color: white" | 0,{{nnbsp}}0,{{nnbsp}}128 | style="background: #2472c8; color: white" | 36, 114, 200 | style="background: #0037da; color: white" | 0,{{nnbsp}}55,{{nnbsp}}218 | style="background: #0000B2; color: white" | 0,{{nnbsp}}0,{{nnbsp}}178 | style="background: #0000bb; color: white" | 0,{{nnbsp}}0,{{nnbsp}}187 | style="background: #00007f; color: white" | 0,{{nnbsp}}0,{{nnbsp}}127 | style="background: #0000ee; color: white" | 0,{{nnbsp}}0,{{nnbsp}}238<ref>Changed from 0,{{nnbsp}}0,{{nnbsp}}205 in July 2004 {{cite web |url=http://invisible-island.net/xterm/xterm.log.html#xterm_192 |title=Patch #192 – 2004/7/12 – XFree86 4.4.99.9}}</ref> | style="background: #006fb8; color: white" | 0,{{nnbsp}}111,{{nnbsp}}184 | style="background: #0000ee; color: white" | 0,{{nnbsp}}0,{{nnbsp}}238 |- | {{tt|35}} || {{tt|45}} || Magenta | style="background: #AA00AA; color: white" | 170,{{nnbsp}}0,{{nnbsp}}170 | style="background: #800080; color: white" | 128,{{nnbsp}}0,{{nnbsp}}128 | style="background: #012456; color: white" | 1,{{nnbsp}}36,{{nnbsp}}86 | style="background: #bc3fbc; color: white" | 188, 63, 188 | style="background: #881798; color: white" | 136,{{nnbsp}}23,{{nnbsp}}152 | style="background: #B200B2; color: white" | 178,{{nnbsp}}0,{{nnbsp}}178 | style="background: #bb00bb; color: white" | 187,{{nnbsp}}0,{{nnbsp}}187 | style="background: #9c009c; color: white" | 156,{{nnbsp}}0,{{nnbsp}}156 | style="background: #cd00cd; color: white" | 205,{{nnbsp}}0,{{nnbsp}}205 | style="background: #762671; color: white" | 118,{{nnbsp}}38,{{nnbsp}}113 | style="background: #cd00cd; color: white" | 205,{{nnbsp}}0,{{nnbsp}}205 |- | {{tt|36}} || {{tt|46}} || Cyan | style="background: #00AAAA; color: white" | 0,{{nnbsp}}170,{{nnbsp}}170 | colspan="2" style="background: #008080; color: white" | 0,{{nnbsp}}128,{{nnbsp}}128 | style="background: #11a8cd; color: white" | 17, 168, 205 | style="background: #3a96dd; color: white" | 58,{{nnbsp}}150,{{nnbsp}}221 | style="background: #00A6B2; color: white" | 0,{{nnbsp}}166,{{nnbsp}}178 | style="background: #00bbbb; color: black" | 0,{{nnbsp}}187,{{nnbsp}}187 | style="background: #009393; color: white" | 0,{{nnbsp}}147,{{nnbsp}}147 | style="background: #00cdcd; color: black" | 0,{{nnbsp}}205,{{nnbsp}}205 | style="background: #2cb5e9; color: black" | 44,{{nnbsp}}181,{{nnbsp}}233 | style="background: #00cdcd; color: black" | 0,{{nnbsp}}205,{{nnbsp}}205 |- | {{tt|37}} || {{tt|47}} || White | style="background: #AAAAAA; color: black" | 170,{{nnbsp}}170,{{nnbsp}}170 | colspan="2" style="background: #c0c0c0; color: black" | 192,{{nnbsp}}192,{{nnbsp}}192 | style="background: #e5e5e5; color: black" | 229, 229, 229 | style="background: #cccccc; color: black" | 204,{{nnbsp}}204,{{nnbsp}}204 | style="background: #BFBFBF; color: black" | 191,{{nnbsp}}191,{{nnbsp}}191 | style="background: #bbbbbb; color: black" | 187,{{nnbsp}}187,{{nnbsp}}187 | style="background: #d2d2d2; color: black" | 210,{{nnbsp}}210,{{nnbsp}}210 | style="background: #e5e5e5; color: black" | 229,{{nnbsp}}229,{{nnbsp}}229 | style="background: #cccccc; color: black" | 204,{{nnbsp}}204,{{nnbsp}}204 | style="background: #e5e5e5; color: black" | 229,{{nnbsp}}229,{{nnbsp}}229 |- | {{tt|90}} || {{tt|100}} || {{nobr|Bright Black (Gray)}} | style="background: #555555; color: white" | 85,{{nnbsp}}85,{{nnbsp}}85 | colspan="2" style="background: #808080; color: black" | 128,{{nnbsp}}128,{{nnbsp}}128 | style="background: #666666; color: white" | 102, 102, 102 | style="background: #767676; color: white" | 118,{{nnbsp}}118,{{nnbsp}}118 | style="background: #666666; color: white" | 102,{{nnbsp}}102,{{nnbsp}}102 | style="background: #555555; color: white" | 85,{{nnbsp}}85,{{nnbsp}}85 | style="background: #7f7f7f; color: white" | 127,{{nnbsp}}127,{{nnbsp}}127 | style="background: #7f7f7f; color: white" | 127,{{nnbsp}}127,{{nnbsp}}127 | style="background: #808080; color: black" | 128,{{nnbsp}}128,{{nnbsp}}128 | style="background: #000000; color: white" | 0,{{nnbsp}}0,{{nnbsp}}0 |- | {{tt|91}} || {{tt|101}} || Bright Red | style="background: #FF5555; color: white" | 255,{{nnbsp}}85,{{nnbsp}}85 | colspan="2" style="background: #ff0000; color: white" | 255,{{nnbsp}}0,{{nnbsp}}0 | style="background: #f14c4c; color: white" | 241, 76, 76 | style="background: #e74856; color: white" | 231,{{nnbsp}}72,{{nnbsp}}86 | style="background: #E60000; color: white" | 230,{{nnbsp}}0,{{nnbsp}}0 | style="background: #ff5555; color: white" | 255,{{nnbsp}}85,{{nnbsp}}85 | colspan="4" style="background: #ff0000; color: white" | 255,{{nnbsp}}0,{{nnbsp}}0 |- | {{tt|92}} || {{tt|102}} || Bright Green | style="background: #55FF55; color: black" | 85,{{nnbsp}}255,{{nnbsp}}85 | colspan="2" style="background: #00ff00; color: black" | 0,{{nnbsp}}255,{{nnbsp}}0 | style="background: #23d18b; color: white" | 35, 209, 139 | style="background: #16c60c; color: black" | 22,{{nnbsp}}198,{{nnbsp}}12 | style="background: #00D900; color: black" | 0,{{nnbsp}}217,{{nnbsp}}0 | style="background: #55ff55; color: black" | 85,{{nnbsp}}255,{{nnbsp}}85 | style="background: #00fc00; color: black" | 0,{{nnbsp}}252,{{nnbsp}}0 | colspan="3" style="background: #00ff00; color: black" | 0,{{nnbsp}}255,{{nnbsp}}0 |- | {{tt|93}} || {{tt|103}} || Bright Yellow | style="background: #FFFF55; color: black" | 255,{{nnbsp}}255,{{nnbsp}}85 | colspan="2" style="background: #ffff00; color: black" | 255,{{nnbsp}}255,{{nnbsp}}0 | style="background: #f5f543; color: black" | 245, 245, 67 | style="background: #f9f1a5; color: black" | 249,{{nnbsp}}241,{{nnbsp}}165 | style="background: #E5E500; color: black" | 230,{{nnbsp}}230,{{nnbsp}}0 | style="background: #ffff55; color: black" | 255,{{nnbsp}}255,{{nnbsp}}85 | colspan="4" style="background: #ffff00; color: black" | 255,{{nnbsp}}255,{{nnbsp}}0 |- | {{tt|94}} || {{tt|104}} || Bright Blue | style="background: #5555FF; color: white" | 85,{{nnbsp}}85,{{nnbsp}}255 | colspan="2" style="background: #0000ff; color: white" | 0,{{nnbsp}}0,{{nnbsp}}255 | style="background: #3b8eea; color: white" | 59, 142, 234 | style="background: #3b78ff; color: white" | 59,{{nnbsp}}120,{{nnbsp}}255 | style="background: #0000FF; color: white" | 0,{{nnbsp}}0,{{nnbsp}}255 | style="background: #5555ff; color: white" | 85,{{nnbsp}}85,{{nnbsp}}255 | style="background: #0000fc; color: white" | 0,{{nnbsp}}0,{{nnbsp}}252 | style="background: #5c5cff; color: white" | 92,{{nnbsp}}92,{{nnbsp}}255<ref>Changed from 0,{{nnbsp}}0,{{nnbsp}}255 in July 2004 {{cite web |url=http://invisible-island.net/xterm/xterm.log.html#xterm_192 |title=Patch #192 – 2004/7/12 – XFree86 4.4.99.9}}</ref> | style="background: #0000ff; color: white" | 0,{{nnbsp}}0,{{nnbsp}}255 | style="background: #5c5cff; color: white" | 92,{{nnbsp}}92,{{nnbsp}}255 |- | {{tt|95}} || {{tt|105}} || Bright Magenta | style="background: #FF55FF; color: black" | 255,{{nnbsp}}85,{{nnbsp}}255 | colspan="2" style="background: #ff00ff; color: white" | 255,{{nnbsp}}0,{{nnbsp}}255 | style="background: #d670d6; color: white" | 214, 112, 214 | style="background: #b4009e; color: white" | 180,{{nnbsp}}0,{{nnbsp}}158 | style="background: #E600E6; color: white" | 230,{{nnbsp}}0,{{nnbsp}}230 | style="background: #ff55ff; color: white" | 255,{{nnbsp}}85,{{nnbsp}}255 | colspan="4" style="background: #ff00ff; color: white" | 255,{{nnbsp}}0,{{nnbsp}}255 |- | {{tt|96}} || {{tt|106}} || Bright Cyan | style="background: #55FFFF; color: black" | 85,{{nnbsp}}255,{{nnbsp}}255 | colspan="2" style="background: #00ffff; color: black" | 0,{{nnbsp}}255,{{nnbsp}}255 | style="background: #29b8dB; color: white" | 41, 184, 219 | style="background: #61d6d6; color: black" | 97,{{nnbsp}}214,{{nnbsp}}214 | style="background: #00E6E6; color: black" | 0,{{nnbsp}}230,{{nnbsp}}230 | style="background: #55ffff; color: black" | 85,{{nnbsp}}255,{{nnbsp}}255 | colspan="4" style="background: #00ffff; color: black" | 0,{{nnbsp}}255,{{nnbsp}}255 |- | {{tt|97}} || {{tt|107}} || Bright White | colspan="3" style="background: #ffffff; color: black" | 255,{{nnbsp}}255,{{nnbsp}}255 | style="background: #e5e5e5; color: black" | {{nobr|229, 229, 229}} | style="background: #f2f2f2; color: black" | 242,{{nnbsp}}242,{{nnbsp}}242 | style="background: #E6E6E6; color: black" | 230,{{nnbsp}}230,{{nnbsp}}230 | colspan="5" style="background: #ffffff; color: black" | 255,{{nnbsp}}255,{{nnbsp}}255 |} </div> ==== 8-bit ==== As [[8-bit color|256-color]] lookup tables became common on graphic cards, escape sequences were added to select from a pre-defined set of 256 colors:{{citation needed|date=September 2013}} ESC[38;5;{{angbr|n}}m Select foreground color where n is a number from the table below ESC[48;5;{{angbr|n}}m Select background color 0- 7: standard colors (as in ESC [ 30–37 m) 8- 15: high intensity colors (as in ESC [ 90–97 m) 16-231: 6 × 6 × 6 cube (216 colors): 16 + 36 × r + 6 × g + b (0 ≤ r, g, b ≤ 5) 232-255: grayscale from dark to light in 24 steps The [[ITU]]'s T.416 Information technology - Open Document Architecture (ODA) and interchange format: Character content architectures<ref name="T.416">{{cite web |url=https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-T.416-199303-I!!PDF-E&type=items |title=T.416 Information technology - Open Document Architecture (ODA) and interchange format: Character content architectures}}</ref> uses ":" as separator characters instead: ESC[38:5:{{angbr|n}}m Select foreground color where n is a number from the table below ESC[48:5:{{angbr|n}}m Select background color<!-- def fg(triad): return 'ffffff' if (triad[2:4] < 'a0') else '000000' standards = ('000000 800000 008000 808000 000080 800080 008080 c0c0c0 ' + '808080 ff0000 00ff00 ffff00 0000ff ff00ff 00ffff ffffff').split(' ') rgbs = '00 5f 87 af d7 ff'.split(' ') greys = '08 12 1c 26 30 3a 44 4e 58 62 6c 76 80 8a 94 9e a8 b2 bc c6 d0 da e4 ee'.split(' ') fgs = '000000 ffffff'.split(' ') code = 0 outs = [[] for i in range(3)] out = '\n| style="color:#%s;background:#%s;" title="#%s" |%s' for i in range(len(standards)): if (i == len(standards) / 2.0): outs[0].append('\n| style="width:1em;"| ') triad = standards[i] outs[0].append(out % (fgs[i < len(standards) / 2], triad, triad, code if (code > 9) else ' %d&nbsp;' % code)) code += 1 for r in range(len(rgbs)): for g in range(len(rgbs)): for b in range(len(rgbs)): triad = rgbs[r] + rgbs[g] + rgbs[b] outs[1].append(out % (fgs[g < len(rgbs) / 2], triad, triad, code)) code += 1 outs[1].append('\n|-\n') for i in range(len(greys)): triad = greys[i] * 3 outs[2].append(out % (fgs[i < len(greys) / 2], triad, triad, code)) code += 1 file_out = open(__file__[:__file__.rfind('.')] + '.htm', 'w') file_out.write('''\ {| table class="collapsible" style="text-align:center;font-size:80%%;width:100%%;background:#f6f6f6;cursor:default;" cellpadding="0" cellspacing="1" |- ! colspan="36" | 256-color mode — foreground: ESC[38;5;#m &nbsp; background: ESC[48;5;#m |- | colspan="18" | Standard colors | colspan="18" | High-intensity colors |- | colspan="36" | {| style="width:100%%;text-align:center;font-weight:bold;" |- %s |- |} |- | colspan="36" | 216 colors |- %s |- | colspan="36" | Grayscale colors |- | colspan="36" | {| style="width:100%%;text-align:center;font-weight:bold;" |- %s |- |} |}''' % (''.join(outs[0]), ''.join(outs[1]), ''.join(outs[2]))) file_out.close() --> {{anchor|256_color_table}} {| class="collapsible" style="text-align:center;font-size:80%;width:100%;background:#f6f6f6;cursor:default;" cellpadding="0" cellspacing="1" |- ! colspan="36" | 256-color mode — foreground: ESC[38;5;#m &nbsp; background: ESC[48;5;#m |- | colspan="18" | Standard colors | colspan="18" | High-intensity colors |- | colspan="36" | {| style="width:100%;text-align:center;font-weight:bold;" |- | style="color:#ffffff;background:#000000;" title="#000000" |&nbsp;0&nbsp; | style="color:#ffffff;background:#800000;" title="#800000" |&nbsp;1&nbsp; | style="color:#ffffff;background:#008000;" title="#008000" |&nbsp;2&nbsp; | style="color:#ffffff;background:#808000;" title="#808000" |&nbsp;3&nbsp; | style="color:#ffffff;background:#000080;" title="#000080" |&nbsp;4&nbsp; | style="color:#ffffff;background:#800080;" title="#800080" |&nbsp;5&nbsp; | style="color:#ffffff;background:#008080;" title="#008080" |&nbsp;6&nbsp; | style="color:#ffffff;background:#c0c0c0;" title="#c0c0c0" |&nbsp;7&nbsp; | style="width:1em;" | | style="color:#000000;background:#808080;" title="#808080" |&nbsp;8&nbsp; | style="color:#000000;background:#ff0000;" title="#ff0000" |&nbsp;9&nbsp; | style="color:#000000;background:#00ff00;" title="#00ff00" |10 | style="color:#000000;background:#ffff00;" title="#ffff00" |11 | style="color:#000000;background:#0000ff;" title="#0000ff" |12 | style="color:#000000;background:#ff00ff;" title="#ff00ff" |13 | style="color:#000000;background:#00ffff;" title="#00ffff" |14 | style="color:#000000;background:#ffffff;" title="#ffffff" |15 |} |- | colspan="36" |216 colors |- | style="color:#ffffff;background:#000000;" title="#000000" |16 | style="color:#ffffff;background:#00005f;" title="#00005f" |17 | style="color:#ffffff;background:#000087;" title="#000087" |18 | style="color:#ffffff;background:#0000af;" title="#0000af" |19 | style="color:#ffffff;background:#0000d7;" title="#0000d7" |20 | style="color:#ffffff;background:#0000ff;" title="#0000ff" |21 | style="color:#ffffff;background:#005f00;" title="#005f00" |22 | style="color:#ffffff;background:#005f5f;" title="#005f5f" |23 | style="color:#ffffff;background:#005f87;" title="#005f87" |24 | style="color:#ffffff;background:#005faf;" title="#005faf" |25 | style="color:#ffffff;background:#005fd7;" title="#005fd7" |26 | style="color:#ffffff;background:#005fff;" title="#005fff" |27 | style="color:#ffffff;background:#008700;" title="#008700" |28 | style="color:#ffffff;background:#00875f;" title="#00875f" |29 | style="color:#ffffff;background:#008787;" title="#008787" |30 | style="color:#ffffff;background:#0087af;" title="#0087af" |31 | style="color:#ffffff;background:#0087d7;" title="#0087d7" |32 | style="color:#ffffff;background:#0087ff;" title="#0087ff" |33 | style="color:#000000;background:#00af00;" title="#00af00" |34 | style="color:#000000;background:#00af5f;" title="#00af5f" |35 | style="color:#000000;background:#00af87;" title="#00af87" |36 | style="color:#000000;background:#00afaf;" title="#00afaf" |37 | style="color:#000000;background:#00afd7;" title="#00afd7" |38 | style="color:#000000;background:#00afff;" title="#00afff" |39 | style="color:#000000;background:#00d700;" title="#00d700" |40 | style="color:#000000;background:#00d75f;" title="#00d75f" |41 | style="color:#000000;background:#00d787;" title="#00d787" |42 | style="color:#000000;background:#00d7af;" title="#00d7af" |43 | style="color:#000000;background:#00d7d7;" title="#00d7d7" |44 | style="color:#000000;background:#00d7ff;" title="#00d7ff" |45 | style="color:#000000;background:#00ff00;" title="#00ff00" |46 | style="color:#000000;background:#00ff5f;" title="#00ff5f" |47 | style="color:#000000;background:#00ff87;" title="#00ff87" |48 | style="color:#000000;background:#00ffaf;" title="#00ffaf" |49 | style="color:#000000;background:#00ffd7;" title="#00ffd7" |50 | style="color:#000000;background:#00ffff;" title="#00ffff" |51 |- | style="color:#ffffff;background:#5f0000;" title="#5f0000" |52 | style="color:#ffffff;background:#5f005f;" title="#5f005f" |53 | style="color:#ffffff;background:#5f0087;" title="#5f0087" |54 | style="color:#ffffff;background:#5f00af;" title="#5f00af" |55 | style="color:#ffffff;background:#5f00d7;" title="#5f00d7" |56 | style="color:#ffffff;background:#5f00ff;" title="#5f00ff" |57 | style="color:#ffffff;background:#5f5f00;" title="#5f5f00" |58 | style="color:#ffffff;background:#5f5f5f;" title="#5f5f5f" |59 | style="color:#ffffff;background:#5f5f87;" title="#5f5f87" |60 | style="color:#ffffff;background:#5f5faf;" title="#5f5faf" |61 | style="color:#ffffff;background:#5f5fd7;" title="#5f5fd7" |62 | style="color:#ffffff;background:#5f5fff;" title="#5f5fff" |63 | style="color:#ffffff;background:#5f8700;" title="#5f8700" |64 | style="color:#ffffff;background:#5f875f;" title="#5f875f" |65 | style="color:#ffffff;background:#5f8787;" title="#5f8787" |66 | style="color:#ffffff;background:#5f87af;" title="#5f87af" |67 | style="color:#ffffff;background:#5f87d7;" title="#5f87d7" |68 | style="color:#ffffff;background:#5f87ff;" title="#5f87ff" |69 | style="color:#000000;background:#5faf00;" title="#5faf00" |70 | style="color:#000000;background:#5faf5f;" title="#5faf5f" |71 | style="color:#000000;background:#5faf87;" title="#5faf87" |72 | style="color:#000000;background:#5fafaf;" title="#5fafaf" |73 | style="color:#000000;background:#5fafd7;" title="#5fafd7" |74 | style="color:#000000;background:#5fafff;" title="#5fafff" |75 | style="color:#000000;background:#5fd700;" title="#5fd700" |76 | style="color:#000000;background:#5fd75f;" title="#5fd75f" |77 | style="color:#000000;background:#5fd787;" title="#5fd787" |78 | style="color:#000000;background:#5fd7af;" title="#5fd7af" |79 | style="color:#000000;background:#5fd7d7;" title="#5fd7d7" |80 | style="color:#000000;background:#5fd7ff;" title="#5fd7ff" |81 | style="color:#000000;background:#5fff00;" title="#5fff00" |82 | style="color:#000000;background:#5fff5f;" title="#5fff5f" |83 | style="color:#000000;background:#5fff87;" title="#5fff87" |84 | style="color:#000000;background:#5fffaf;" title="#5fffaf" |85 | style="color:#000000;background:#5fffd7;" title="#5fffd7" |86 | style="color:#000000;background:#5fffff;" title="#5fffff" |87 |- | style="color:#ffffff;background:#870000;" title="#870000" |88 | style="color:#ffffff;background:#87005f;" title="#87005f" |89 | style="color:#ffffff;background:#870087;" title="#870087" |90 | style="color:#ffffff;background:#8700af;" title="#8700af" |91 | style="color:#ffffff;background:#8700d7;" title="#8700d7" |92 | style="color:#ffffff;background:#8700ff;" title="#8700ff" |93 | style="color:#ffffff;background:#875f00;" title="#875f00" |94 | style="color:#ffffff;background:#875f5f;" title="#875f5f" |95 | style="color:#ffffff;background:#875f87;" title="#875f87" |96 | style="color:#ffffff;background:#875faf;" title="#875faf" |97 | style="color:#ffffff;background:#875fd7;" title="#875fd7" |98 | style="color:#ffffff;background:#875fff;" title="#875fff" |99 | style="color:#ffffff;background:#878700;" title="#878700" |100 | style="color:#ffffff;background:#87875f;" title="#87875f" |101 | style="color:#ffffff;background:#878787;" title="#878787" |102 | style="color:#ffffff;background:#8787af;" title="#8787af" |103 | style="color:#ffffff;background:#8787d7;" title="#8787d7" |104 | style="color:#ffffff;background:#8787ff;" title="#8787ff" |105 | style="color:#000000;background:#87af00;" title="#87af00" |106 | style="color:#000000;background:#87af5f;" title="#87af5f" |107 | style="color:#000000;background:#87af87;" title="#87af87" |108 | style="color:#000000;background:#87afaf;" title="#87afaf" |109 | style="color:#000000;background:#87afd7;" title="#87afd7" |110 | style="color:#000000;background:#87afff;" title="#87afff" |111 | style="color:#000000;background:#87d700;" title="#87d700" |112 | style="color:#000000;background:#87d75f;" title="#87d75f" |113 | style="color:#000000;background:#87d787;" title="#87d787" |114 | style="color:#000000;background:#87d7af;" title="#87d7af" |115 | style="color:#000000;background:#87d7d7;" title="#87d7d7" |116 | style="color:#000000;background:#87d7ff;" title="#87d7ff" |117 | style="color:#000000;background:#87ff00;" title="#87ff00" |118 | style="color:#000000;background:#87ff5f;" title="#87ff5f" |119 | style="color:#000000;background:#87ff87;" title="#87ff87" |120 | style="color:#000000;background:#87ffaf;" title="#87ffaf" |121 | style="color:#000000;background:#87ffd7;" title="#87ffd7" |122 | style="color:#000000;background:#87ffff;" title="#87ffff" |123 |- | style="color:#ffffff;background:#af0000;" title="#af0000" |124 | style="color:#ffffff;background:#af005f;" title="#af005f" |125 | style="color:#ffffff;background:#af0087;" title="#af0087" |126 | style="color:#ffffff;background:#af00af;" title="#af00af" |127 | style="color:#ffffff;background:#af00d7;" title="#af00d7" |128 | style="color:#ffffff;background:#af00ff;" title="#af00ff" |129 | style="color:#ffffff;background:#af5f00;" title="#af5f00" |130 | style="color:#ffffff;background:#af5f5f;" title="#af5f5f" |131 | style="color:#ffffff;background:#af5f87;" title="#af5f87" |132 | style="color:#ffffff;background:#af5faf;" title="#af5faf" |133 | style="color:#ffffff;background:#af5fd7;" title="#af5fd7" |134 | style="color:#ffffff;background:#af5fff;" title="#af5fff" |135 | style="color:#ffffff;background:#af8700;" title="#af8700" |136 | style="color:#ffffff;background:#af875f;" title="#af875f" |137 | style="color:#ffffff;background:#af8787;" title="#af8787" |138 | style="color:#ffffff;background:#af87af;" title="#af87af" |139 | style="color:#ffffff;background:#af87d7;" title="#af87d7" |140 | style="color:#ffffff;background:#af87ff;" title="#af87ff" |141 | style="color:#000000;background:#afaf00;" title="#afaf00" |142 | style="color:#000000;background:#afaf5f;" title="#afaf5f" |143 | style="color:#000000;background:#afaf87;" title="#afaf87" |144 | style="color:#000000;background:#afafaf;" title="#afafaf" |145 | style="color:#000000;background:#afafd7;" title="#afafd7" |146 | style="color:#000000;background:#afafff;" title="#afafff" |147 | style="color:#000000;background:#afd700;" title="#afd700" |148 | style="color:#000000;background:#afd75f;" title="#afd75f" |149 | style="color:#000000;background:#afd787;" title="#afd787" |150 | style="color:#000000;background:#afd7af;" title="#afd7af" |151 | style="color:#000000;background:#afd7d7;" title="#afd7d7" |152 | style="color:#000000;background:#afd7ff;" title="#afd7ff" |153 | style="color:#000000;background:#afff00;" title="#afff00" |154 | style="color:#000000;background:#afff5f;" title="#afff5f" |155 | style="color:#000000;background:#afff87;" title="#afff87" |156 | style="color:#000000;background:#afffaf;" title="#afffaf" |157 | style="color:#000000;background:#afffd7;" title="#afffd7" |158 | style="color:#000000;background:#afffff;" title="#afffff" |159 |- | style="color:#ffffff;background:#d70000;" title="#d70000" |160 | style="color:#ffffff;background:#d7005f;" title="#d7005f" |161 | style="color:#ffffff;background:#d70087;" title="#d70087" |162 | style="color:#ffffff;background:#d700af;" title="#d700af" |163 | style="color:#ffffff;background:#d700d7;" title="#d700d7" |164 | style="color:#ffffff;background:#d700ff;" title="#d700ff" |165 | style="color:#ffffff;background:#d75f00;" title="#d75f00" |166 | style="color:#ffffff;background:#d75f5f;" title="#d75f5f" |167 | style="color:#ffffff;background:#d75f87;" title="#d75f87" |168 | style="color:#ffffff;background:#d75faf;" title="#d75faf" |169 | style="color:#ffffff;background:#d75fd7;" title="#d75fd7" |170 | style="color:#ffffff;background:#d75fff;" title="#d75fff" |171 | style="color:#ffffff;background:#d78700;" title="#d78700" |172 | style="color:#ffffff;background:#d7875f;" title="#d7875f" |173 | style="color:#ffffff;background:#d78787;" title="#d78787" |174 | style="color:#ffffff;background:#d787af;" title="#d787af" |175 | style="color:#ffffff;background:#d787d7;" title="#d787d7" |176 | style="color:#ffffff;background:#d787ff;" title="#d787ff" |177 | style="color:#000000;background:#d7af00;" title="#d7af00" |178 | style="color:#000000;background:#d7af5f;" title="#d7af5f" |179 | style="color:#000000;background:#d7af87;" title="#d7af87" |180 | style="color:#000000;background:#d7afaf;" title="#d7afaf" |181 | style="color:#000000;background:#d7afd7;" title="#d7afd7" |182 | style="color:#000000;background:#d7afff;" title="#d7afff" |183 | style="color:#000000;background:#d7d700;" title="#d7d700" |184 | style="color:#000000;background:#d7d75f;" title="#d7d75f" |185 | style="color:#000000;background:#d7d787;" title="#d7d787" |186 | style="color:#000000;background:#d7d7af;" title="#d7d7af" |187 | style="color:#000000;background:#d7d7d7;" title="#d7d7d7" |188 | style="color:#000000;background:#d7d7ff;" title="#d7d7ff" |189 | style="color:#000000;background:#d7ff00;" title="#d7ff00" |190 | style="color:#000000;background:#d7ff5f;" title="#d7ff5f" |191 | style="color:#000000;background:#d7ff87;" title="#d7ff87" |192 | style="color:#000000;background:#d7ffaf;" title="#d7ffaf" |193 | style="color:#000000;background:#d7ffd7;" title="#d7ffd7" |194 | style="color:#000000;background:#d7ffff;" title="#d7ffff" |195 |- | style="color:#ffffff;background:#ff0000;" title="#ff0000" |196 | style="color:#ffffff;background:#ff005f;" title="#ff005f" |197 | style="color:#ffffff;background:#ff0087;" title="#ff0087" |198 | style="color:#ffffff;background:#ff00af;" title="#ff00af" |199 | style="color:#ffffff;background:#ff00d7;" title="#ff00d7" |200 | style="color:#ffffff;background:#ff00ff;" title="#ff00ff" |201 | style="color:#ffffff;background:#ff5f00;" title="#ff5f00" |202 | style="color:#ffffff;background:#ff5f5f;" title="#ff5f5f" |203 | style="color:#ffffff;background:#ff5f87;" title="#ff5f87" |204 | style="color:#ffffff;background:#ff5faf;" title="#ff5faf" |205 | style="color:#ffffff;background:#ff5fd7;" title="#ff5fd7" |206 | style="color:#ffffff;background:#ff5fff;" title="#ff5fff" |207 | style="color:#ffffff;background:#ff8700;" title="#ff8700" |208 | style="color:#ffffff;background:#ff875f;" title="#ff875f" |209 | style="color:#ffffff;background:#ff8787;" title="#ff8787" |210 | style="color:#ffffff;background:#ff87af;" title="#ff87af" |211 | style="color:#ffffff;background:#ff87d7;" title="#ff87d7" |212 | style="color:#ffffff;background:#ff87ff;" title="#ff87ff" |213 | style="color:#000000;background:#ffaf00;" title="#ffaf00" |214 | style="color:#000000;background:#ffaf5f;" title="#ffaf5f" |215 | style="color:#000000;background:#ffaf87;" title="#ffaf87" |216 | style="color:#000000;background:#ffafaf;" title="#ffafaf" |217 | style="color:#000000;background:#ffafd7;" title="#ffafd7" |218 | style="color:#000000;background:#ffafff;" title="#ffafff" |219 | style="color:#000000;background:#ffd700;" title="#ffd700" |220 | style="color:#000000;background:#ffd75f;" title="#ffd75f" |221 | style="color:#000000;background:#ffd787;" title="#ffd787" |222 | style="color:#000000;background:#ffd7af;" title="#ffd7af" |223 | style="color:#000000;background:#ffd7d7;" title="#ffd7d7" |224 | style="color:#000000;background:#ffd7ff;" title="#ffd7ff" |225 | style="color:#000000;background:#ffff00;" title="#ffff00" |226 | style="color:#000000;background:#ffff5f;" title="#ffff5f" |227 | style="color:#000000;background:#ffff87;" title="#ffff87" |228 | style="color:#000000;background:#ffffaf;" title="#ffffaf" |229 | style="color:#000000;background:#ffffd7;" title="#ffffd7" |230 | style="color:#000000;background:#ffffff;" title="#ffffff" |231 |- |- | colspan="36" |Grayscale colors |- | colspan="36" | {| style="width:100%;text-align:center;font-weight:bold;" |- | style="color:#ffffff;background:#080808;" title="#080808" |232 | style="color:#ffffff;background:#121212;" title="#121212" |233 | style="color:#ffffff;background:#1c1c1c;" title="#1c1c1c" |234 | style="color:#ffffff;background:#262626;" title="#262626" |235 | style="color:#ffffff;background:#303030;" title="#303030" |236 | style="color:#ffffff;background:#3a3a3a;" title="#3a3a3a" |237 | style="color:#ffffff;background:#444444;" title="#444444" |238 | style="color:#ffffff;background:#4e4e4e;" title="#4e4e4e" |239 | style="color:#ffffff;background:#585858;" title="#585858" |240 | style="color:#ffffff;background:#626262;" title="#626262" |241 | style="color:#ffffff;background:#6c6c6c;" title="#6c6c6c" |242 | style="color:#ffffff;background:#767676;" title="#767676" |243 | style="color:#000000;background:#808080;" title="#808080" |244 | style="color:#000000;background:#8a8a8a;" title="#8a8a8a" |245 | style="color:#000000;background:#949494;" title="#949494" |246 | style="color:#000000;background:#9e9e9e;" title="#9e9e9e" |247 | style="color:#000000;background:#a8a8a8;" title="#a8a8a8" |248 | style="color:#000000;background:#b2b2b2;" title="#b2b2b2" |249 | style="color:#000000;background:#bcbcbc;" title="#bcbcbc" |250 | style="color:#000000;background:#c6c6c6;" title="#c6c6c6" |251 | style="color:#000000;background:#d0d0d0;" title="#d0d0d0" |252 | style="color:#000000;background:#dadada;" title="#dadada" |253 | style="color:#000000;background:#e4e4e4;" title="#e4e4e4" |254 | style="color:#000000;background:#eeeeee;" title="#eeeeee" |255 |} |} There has also been a similar but incompatible 88-color encoding using the same escape sequence, seen in {{code|rxvt}} and {{code|xterm-88color}}. Not much is known about the scheme besides the color codes. It uses a 4×4×4 color cube. ==== 24-bit ==== As "true color" graphic cards with 16 to 24 bits of color became common, applications began to support 24-bit colors. Terminal emulators supporting setting 24-bit foreground and background colors with escape sequences include Xterm,<ref name="xtc"/> KDE's [[Konsole]],<ref>{{cite web |url=https://quickgit.kde.org/?p=konsole.git&a=blob&f=tests%2Fcolor-spaces.pl |title=color-spaces.pl (a copy of 256colors2.pl from xterm dated 1999-07-11) |publisher=KDE |date=2006-12-06 }}{{Dead link|date=June 2020 |bot=InternetArchiveBot |fix-attempted=yes }}</ref><ref>{{cite web |url=https://invent.kde.org/personalizedrefrigerator/konsole/-/blob/master/doc/user/README.moreColors |title=README.moreColors |publisher=KDE |date=2010-04-22 }}</ref> and iTerm, as well as all libvte based terminals,<ref>{{cite web |url=https://bugzilla.gnome.org/show_bug.cgi?id=704449 |title=libvte's bug report and patches: Support for 16 million colors |publisher=GNOME Bugzilla |date=2014-04-04 |access-date=2016-06-05}}</ref> including [[GNOME Terminal]].<ref>{{cite web|url=https://askubuntu.com/questions/512525/how-to-enable-24bit-true-color-support-in-gnome-terminal|title=How to enable 24bit true color support in Gnome terminal?}}</ref> ESC[38;2;{{angbr|r}};{{angbr|g}};{{angbr|b}} m Select RGB foreground color ESC[48;2;{{angbr|r}};{{angbr|g}};{{angbr|b}} m Select RGB background color The syntax is likely based on the [[ITU]]'s T.416 [[Open Document Architecture]] (ODA) and interchange format: Character content architectures,<ref name="T.416"/> which was adopted as ISO/IEC 8613-6 but ended up as a commercial failure.{{cn|date=February 2022}} The ODA version is more elaborate and thus incompatible: * The parameters after the '2' (r, g, and b) are optional and can be left empty. * Semicolons are replaced by colons, as above. * There is a leading "colorspace ID".<ref name="xtc"/> The definition of the colorspace ID is not included in that specification, so it may be blank to represent the unspecified default. For CMYK color specifications, mintty interprets the colorspace ID parameter as specifying the maximum value which the channel values are given out of (e.g. 100 or 255).<ref name="mintty"/> * In addition to the '2' value after 48 to specify a Red-Green-Blue format (and the '5' above for a 0-255 indexed color), there are alternatives of '0' for implementation-defined and '1' for transparent - neither of which have any further parameters; '3' specifies colors using a Cyan-Magenta-Yellow scheme, and '4' for a Cyan-Magenta-Yellow-Black one, the latter using the position marked as "unused" for the Black component:<ref name="T.416"/> ESC[38:2:{{angbr|Color-Space-ID}}:{{angbr|r}}:{{angbr|g}}:{{angbr|b}}:{{angbr|unused}}:{{angbr|[[Color difference|CS tolerance]]}}:{{angbr|Color-Space associated with tolerance: 0 for "CIELUV"; 1 for "CIELAB"}} m Select RGB foreground color ESC[48:2:{{angbr|Color-Space-ID}}:{{angbr|r}}:{{angbr|g}}:{{angbr|b}}:{{angbr|unused}}:{{angbr|CS tolerance}}:{{angbr|Color-Space associated with tolerance: 0 for "CIELUV"; 1 for "CIELAB"}} m Select RGB background color The ITU-RGB variation is supported by xterm, with the colorspace ID and tolerance parameters ignored. The simpler scheme using semicolons is initially found in Konsole.<ref name="xtc"/>{{rp|at=Can I set a color by its number?}} ==== Unix environment variables relating to color support ==== Rather than using the color support in termcap and terminfo introduced in SVr3.2 (1987),<ref>{{cite manual |url=https://invisible-island.net/ncurses/man/curs_color.3x.html#h2-HISTORY |section=History |title=curs_color(3X) - manipulate terminal colors with curses }}</ref> the S-Lang library (version 0.99-32, June 1996) used a separate environment variable {{code|$COLORTERM}} to indicate whether a terminal emulator could use colors at all, and later added values to indicate if it supported 24-bit color.<ref>{{cite web |title=Midnight Commander: lib/tty/color-slang.c|website=Fossies |url=https://fossies.org/linux/mc/lib/tty/color-slang.c}}</ref><ref name=ncurses-on-slang>{{cite web |first=Thomas E. | last=Dickey |title=NCURSES — comments on S-Lang |url=https://invisible-island.net/ncurses/ncurses-slang.html |year=2017 |website=invisible-island.net}}</ref> This system, although poorly documented, became widespread enough for Fedora and RHEL to consider using it as a simpler and more universal detection mechanism compared to querying the now-updated libraries.<ref>{{cite web |title=Features/256 Color Terminals - Fedora Project Wiki |url=https://fedoraproject.org/wiki/Features/256_Color_Terminals#Scope |website=Fedora Project |archive-url=https://web.archive.org/web/20121004184942/https://fedoraproject.org/wiki/Features/256_Color_Terminals#Scope|archive-date=4 October 2012|url-status=live}}</ref> Some terminal emulators (urxvt, konsole) set {{code|$COLORFGBG}} to report the color scheme of the terminal (mainly light vs. dark background). This behavior originated in S-Lang<ref name=ncurses-on-slang/> and is used by vim. Gnome-terminal refuses to add this behavior, as the syntax for the value is not agreed upon, the value cannot be changed upon a runtime change of the palette, and more "proper" xterm OSC 4/10/11 sequences already exist.<ref>{{cite web |title=Bug 733423 – Please set COLORFGBG environment variable for automatic color detection |url=https://bugzilla.gnome.org/show_bug.cgi?id=733423 |website=bugzilla.gnome.org}}</ref> == {{anchor|OSC}} Operating System Command sequences == Most Operating System Command sequences were defined by Xterm, but many are also supported by other terminal emulators. For historical reasons, Xterm can end the command with [[Bell character|{{code|BEL}}]] (0x07) as well as the standard {{code|ST}} (0x9C or 0x1B 0x5C).<ref name="xtc"/> For example, Xterm allows the window title to be set by {{code|ESC ]0;this is the window title BEL}}. A non-xterm extension is the hyperlink, {{code|ESC ]8;;link ST}} from 2017, used by VTE,<ref name="vte">{{cite web |last1=Koblinger |first1=Egmont |title=Hyperlinks (a.k.a. HTML-like anchors) in terminal emulators |url=https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda |website=GitHub Gists |language=en}}</ref>{{discuss|use of primary source for promotion}} iTerm2,<ref name="vte"/> and mintty,<ref>{{cite web |title=mintty/mintty: Control Sequences |url=https://github.com/mintty/mintty/wiki/CtrlSeqs#hyperlinks |website=GitHub |language=en}}</ref> among others.<ref>{{cite web |title=OSC 8 adoption in terminal emulators |url=https://github.com/Alhadis/OSC8-Adoption |last1=Koblinger |first1=Egmont |website=[[GitHub]] |language=en}}</ref> The Linux console uses {{code|ESC ] P n rr gg bb}} to change the palette, which, if hard-coded into an application, may hang other terminals.<ref>{{cite web|url=https://man7.org/linux/man-pages/man4/console_codes.4.html|title=console_codes — Linux console escape and control sequences|work=Linux Programmer's Manual}}</ref> However, appending {{code|ST}} will be ignored by Linux and form a proper, ignorable sequence for other terminals.{{Citation needed|date=January 2017}} == Fs Escape sequences == If the {{code|ESC}} is followed by a byte in the range {{tt|0x60—0x7E}}, the escape sequence is of type {{code|Fs}}. This type is used for control functions individually registered with the [[ISO-IR]] registry.<ref name="iso-ir-index">{{citation |mode=cs1 |title=ISO-IR: ISO/IEC International Register of Coded Character Sets To Be Used With Escape Sequences |publisher=ITSCJ/[[Information Processing Society of Japan|IPSJ]] |url=https://itscj.ipsj.or.jp/english/vbcqpr00000004qn-att/ISO-IR.pdf |access-date=12 May 2023}}</ref> A table of these is listed under [[ISO/IEC 2022#Other control functions|ISO/IEC 2022]]. == Fp Escape sequences == If the {{code|ESC}} is followed by a byte in the range {{tt|0x30—0x3F}}, the escape sequence is of type {{code|Fp}}, which is set apart for up to sixteen private-use control functions.<ref name="ECMA-35"/>{{Rp|6.5.3}} {| class="wikitable" |+ Some type {{tt|Fp}} (private-use) escape sequences recognised by the [[VT100]] |- ! !!Abbr!!Name!!Effect |- id=DECSC | {{nobr|{{tt|ESC 7}}}} | {{tt|DECSC}} | DEC Save Cursor | Saves the cursor position, encoding shift state and formatting attributes.<ref name="Digital">{{citation|mode=cs1 |url=https://vt100.net/docs/vt510-rm/DECSC.html |title=DECSC—Save Cursor |work=VT510 Video Terminal Programmer Information |author=Digital |author-link=Digital Equipment Corporation}}</ref><ref name="xtc"/> |- id=DECRC | {{tt|ESC 8}} | {{tt|DECRC}} | {{nobr|DEC Restore Cursor}} | Restores the cursor position, encoding shift state and formatting attributes from the previous DECSC if any, otherwise resets these all to their defaults.<ref name="Digital"/><ref name="xtc"/> |} == nF Escape sequences == If the {{code|ESC}} is followed by a byte in the range {{tt|0x20—0x2F}}, the escape sequence is of type {{code|nF}}. Said byte is followed by any number of additional bytes in this range, and then a byte in the range {{tt|0x30-0x7E}}. These escape sequences are further subcategorised by the low two bits of the first byte, e.g. "type {{code|2F}}" for sequences where the first byte is {{tt|0x22}}; and by whether the final byte is in the range {{tt|0x30—0x3F}} indicating private use (e.g. "type {{code|2Fp}}") or not (e.g. "type {{code|2Ft}}").<ref name="ECMA-35"/>{{Rp|13.2.1}} Most of the {{code|nFt}} sequences are for changing the current character set, and are listed in [[ISO/IEC 2022#Character set designations|ISO/IEC 2022]]. Some others: {| class="wikitable" |+ Some type {{tt|0Ft}} (announcement) ANSI escape sequences<ref name="xtc"/><ref name="ECMA-35"/>{{Rp|15.2}} |- ! !!Abbr!!Name!!Effect |- id=ACS6 | {{tt|ESC SP F}} | {{plainlist|style=font-family:monospace| * ACS6 * S7C1T}} | {{plainlist| * Announce Code Structure 6 * {{nowrap|Send 7-bit C1 Control Character to the Host}}}} | Makes the function keys send ESC + letter instead of 8-bit C1 codes. |- id=ACS7 | {{nobr|{{tt|ESC SP G}}}} | {{plainlist|style=font-family:monospace| * ACS7 * S8C1T}} | {{plainlist| * Announce Code Structure 7 * {{nowrap|Send 8-bit C1 Control Character to the Host}}}} | Makes the function keys send 8-bit C1 codes. |} If the first byte is '#' the public sequences are reserved for additional ISO-IR registered individual control functions.<ref name="ECMA-35"/>{{Rp|6.5.2}} No such sequences are presently registered.<ref name="iso-ir-index"/> Type {{code|3Fp}} sequences (which includes ones starting with '#') are available for private-use control functions.<ref name="ECMA-35"/>{{Rp|6.5.3}} {| class="wikitable" |+ Some type {{tt|3Fp}} (private-use) escape sequences recognised by the [[VT100]] |- ! !!Abbr!!Name!!Effect |- id=DECDHL | {{tt|ESC # 3}} | {{tt|DECDHL}} | DEC Double-Height Letters, Top Half | Makes the current line use characters twice as tall. This code is for the top half.<ref name="ascii-table.com">{{citation |url=http://ascii-table.com/ansi-escape-sequences-vt-100.php |title=ANSI Escape sequences - VT100 / VT52 |access-date=21 August 2020 |archive-date=27 February 2009 |archive-url=https://web.archive.org/web/20090227051140/http://ascii-table.com/ansi-escape-sequences-vt-100.php |url-status=dead }}</ref> |- id=DECDHL | {{tt|ESC # 4}} | {{tt|DECDHL}} | {{nobr|DEC Double-Height Letters, Bottom Half}} | Makes the current line use characters twice as tall. This code is for the bottom half.<ref name="ascii-table.com"/> |- id=DECSWL | {{tt|ESC # 5}} | {{tt|DECSWL}} | DEC Single-Width Line | Makes the current line use single-width characters, per the default behaviour.<ref>{{citation|mode=cs1 |url=https://vt100.net/docs/vt510-rm/DECSWL.html |title=DECSWL—Single-Width, Single-Height Line |work=VT510 Video Terminal Programmer Information |author=Digital |author-link=Digital Equipment Corporation}}</ref><ref name="xtc"/> |- id=DECRC | {{nobr|{{tt|ESC # 6}}}} | {{tt|DECDWL}} | {{nowrap|DEC Double-Width Line}} | Makes the current line use double-width characters, discarding any characters in the second half of the line.<ref>{{citation|mode=cs1 |url=https://vt100.net/docs/vt510-rm/DECDWL.html |title=DECDWL—Double-Width, Single-Height Line |work=VT510 Video Terminal Programmer Information |author=Digital |author-link=Digital Equipment Corporation}}</ref><ref name="xtc"/> |} == Examples == {{code|CSI 2 J}} — This clears the screen and, on some devices, locates the cursor to the y,x position 1,1 (upper left corner). {{code|CSI 32 m}} — This makes text green. The green may be a dark, dull green, so you may wish to enable Bold with the sequence {{code|CSI 1 m}} which would make it bright green, or combined as {{code|CSI 32 ; 1 m}}. Some implementations use the Bold state to make the character Bright. {{code|CSI 0 ; 6 8 ; "DIR" ; 13 p}} — This reassigns the key F10 to send to the keyboard buffer the string "DIR" and ENTER, which in the DOS command line would display the contents of the current directory. (MS-DOS ANSI.SYS only) This was sometimes used for [[ANSI bomb]]s. This is a private-use code (as indicated by the letter p), using a non-standard extension to include a string-valued parameter. Following the letter of the standard would consider the sequence to end at the letter D. {{code|CSI s}} — This saves the cursor position. Using the sequence {{code|CSI u}} will restore it to the position. Say the current cursor position is 7(y) and 10(x). The sequence {{code|CSI s}} will save those two numbers. Now you can move to a different cursor position, such as 20(y) and 3(x), using the sequence {{code|CSI 20 ; 3 H}} or {{code|CSI 20 ; 3 f}}. Now if you use the sequence CSI u the cursor position will return to 7(y) and 10(x). Some terminals require the DEC sequences {{code|ESC 7}} / {{code|ESC 8}} instead which is more widely supported. === In shell scripting === ANSI escape codes are often used in [[UNIX]] and UNIX-like [[virtual console|terminals]] to provide [[syntax highlighting]]. For example, on compatible terminals, the following ''[[ls|list]]'' command color-codes file and directory names by type. {{pre|ls --color}} Users can employ escape codes in their scripts by including them as part of ''[[standard output]]'' or ''[[stderr|standard error]]''. For example, the following GNU ''[[sed]]'' command embellishes the output of the ''[[make (software)|make]]'' command by displaying lines containing words starting with "WARN" in [[reverse video]] and words starting with "ERR" in bright yellow on a dark red background ([[letter case]] is ignored). The representations of the codes are highlighted.<ref>{{cite web |url=http://www.debian.org/doc/manuals/debian-reference/ch09.en.html#_colorized_shell_echo |title=Chapter 9. System tips|work=debian.org}}</ref> <span style="white-space:pre-wrap;">make 2&gt;&amp;1 | sed -e 's/.*\bWARN.*/<span style="border:1px solid grey;border-radius:5px;color:white;background:black;font-weight:bolder;">\x1b[7m</span>&<span style="border:1px solid grey;border-radius:5px;">\x1b[0m</span>/i' -e 's/.*\bERR.*/<span style="border:1px solid grey;border-radius:5px;color:yellow;background:maroon;font-weight:bolder;">\x1b[93;41m</span>&<span style="border:1px solid grey;border-radius:5px;">\x1b[0m</span>/i'</span> The following [[Bash (Unix shell)|Bash]] function flashes the terminal (by alternately sending reverse and normal video mode codes) until the user presses a key.<ref>{{cite web |title=VT100.net: Digital VT100 User Guide |url=http://vt100.net/docs/vt100-ug/chapter3.html |access-date=2015-01-19}}</ref> {{codett|lang=bash|flasher () { while true; do printf}} <span style="border:1px solid grey;border-radius:5px;color:white;background:black;font-weight:bolder;">\\e[?5h</span>{{codett|lang=bash|; sleep 0.1; printf}} <span style="border:1px solid grey;border-radius:5px;font-weight:bolder;">\\e[?5l</span>{{codett|lang=bash|; read -s -n1 -t1 && break; done; } }} This can be used to alert a programmer when a lengthy command terminates, such as with {{code|make ; flasher}}{{thin space}}.<ref>{{cite web |title=bash – How to get a notification when my commands are done – Ask Different |url=http://apple.stackexchange.com/questions/9412/how-to-get-a-notification-when-my-commands-are-done |access-date=2015-01-19}}</ref> {{sxhl|printf \\033c|bash}} This will reset the console, similar to the command {{code|reset}} on modern Linux systems; however it should work even on older Linux systems and on other (non-Linux) UNIX variants. === In C === This following programs creates a table of numbers from 0 to 109, each of which is displayed in the format specified by the [[#SGR|Select Graphic Rendition]] escape sequence using that number as the graphic rendition code. [[File:ANSI sample program output.png|right|thumb|Output of example program on [[Gnome Terminal]]]]<syntaxhighlight lang="c" line="1"> #include <stdio.h> int main(void) { int i, j, n; for (i = 0; i < 11; i++) { for (j = 0; j < 10; j++) { n = 10 * i + j; if (n > 108) break; printf("\033[%dm %3d\033[m", n, n); } printf("\n"); } return 0; } </syntaxhighlight> == Terminal input sequences == {{More citations needed|section|date=October 2023}} Pressing special keys on the keyboard, as well as outputting many xterm CSI, DCS, or OSC sequences, often produces a CSI, DCS, or OSC sequence, sent from the terminal to the computer as though the user typed it. When typing input on a terminal keypresses outside the normal main alphanumeric keyboard area can be sent to the host as ANSI sequences. For keys that have an equivalent output function, such as the cursor keys, these often mirror the output sequences. However, for most keypresses there isn't an equivalent output sequence to use. There are several encoding schemes, and unfortunately most terminals mix sequences from different schemes, so host software has to be able to deal with input sequences using any scheme. To complicate the matter, the VT terminals themselves have two schemes of input, ''normal mode'' and ''application mode'' that can be switched by the application. (draft section) <pre> <char> -> char <esc> <nochar> -> esc <esc> <esc> -> esc <esc> <char> -> Alt-keypress or keycode sequence <esc> '[' <nochar> -> Alt-[ <esc> '[' (<modifier>) <char> -> keycode sequence, <modifier> is a decimal number and defaults to 1 (xterm) <esc> '[' (<keycode>) (';'<modifier>) '~' -> keycode sequence, <keycode> and <modifier> are decimal numbers and default to 1 (vt) </pre> If the terminating character is '~', the first number must be present and is a keycode number, the second number is an optional modifier value. If the terminating character is a letter, the letter is the keycode value, and the optional number is the modifier value. The modifier value defaults to 1, and after subtracting 1 is a bitmap of modifier keys being pressed: {{keypress|Meta|Ctrl|Alt|Shift}}. So, for example, <code>&lt;esc>[4;2~</code> is {{keypress|Shift|End}}, <code>&lt;esc>[20~</code> is function key {{keypress|F9}}, <code>&lt;esc>[5C</code> is {{keypress|Ctrl|Right}}. In other words, the modifier is the sum of the following numbers: {| class="wikitable" |- ! Key pressed ! Number ! Comment |- | | 1 | always added, the rest are optional |- | Shift | 1 | |- | (Left) Alt | 2 | |- | Control | 4 | |- | Meta | 8 | |} <pre> vt sequences: <esc>[1~ - Home <esc>[16~ - <esc>[31~ - F17 <esc>[2~ - Insert <esc>[17~ - F6 <esc>[32~ - F18 <esc>[3~ - Delete <esc>[18~ - F7 <esc>[33~ - F19 <esc>[4~ - End <esc>[19~ - F8 <esc>[34~ - F20 <esc>[5~ - PgUp <esc>[20~ - F9 <esc>[35~ - <esc>[6~ - PgDn <esc>[21~ - F10 <esc>[7~ - Home <esc>[22~ - <esc>[8~ - End <esc>[23~ - F11 <esc>[9~ - <esc>[24~ - F12 <esc>[10~ - F0 <esc>[25~ - F13 <esc>[11~ - F1 <esc>[26~ - F14 <esc>[12~ - F2 <esc>[27~ - <esc>[13~ - F3 <esc>[28~ - F15 <esc>[14~ - F4 <esc>[29~ - F16 <esc>[15~ - F5 <esc>[30~ - xterm sequences: <esc>[A - Up <esc>[K - <esc>[U - <esc>[B - Down <esc>[L - <esc>[V - <esc>[C - Right <esc>[M - <esc>[W - <esc>[D - Left <esc>[N - <esc>[X - <esc>[E - <esc>[O - <esc>[Y - <esc>[F - End <esc>[1P - F1 <esc>[Z - <esc>[G - Keypad 5 <esc>[1Q - F2 <esc>[H - Home <esc>[1R - F3 <esc>[I - <esc>[1S - F4 <esc>[J - <esc>[T - </pre> <code>&lt;esc>[A</code> to <code>&lt;esc>[D</code> are the same as the ANSI output sequences. The <code>&lt;modifier></code> is normally omitted if no modifier keys are pressed, but most implementations always emit the <code>&lt;modifier></code> for {{keypress|F1|F4|chain=–}}. (draft section) Xterm has a comprehensive documentation page on the various function-key and mouse input sequence schemes from DEC's VT terminals and various other terminals it emulates.<ref name="xtc">{{cite web |title=XTerm Control Sequences (ctlseqs) |url=https://invisible-island.net/xterm/ctlseqs/ctlseqs.html |first1=Edward |last1=Moy |first2=Stephen |last2=Gildea |first3=Thomas |last3=Dickey |year=2019 |website=Invisible Island}}</ref> Thomas Dickey has added a lot of support to it over time;<ref>{{cite web |last1=Dickey |first1=Thomas |title=XTerm FAQ: Comparing versions, by counting controls |url=https://invisible-island.net/xterm/xterm.faq.html#compare_versions |website=Invisible Island |access-date=25 January 2020}}</ref> he also maintains a list of default keys used by other terminal emulators for comparison.<ref>{{cite web |year=2016 |last1=Dickey |first1=Thomas |title=Table of function-keys for XTerm and other Terminal Emulators |url=https://invisible-island.net/xterm/xterm-function-keys.html |website=Invisible Island |access-date=25 January 2020}}</ref> * On the Linux console, certain function keys generate sequences of the form <code>CSI [ ''char''</code>. The CSI sequence should terminate on the <code>[</code>. * Old versions of [[Terminator (terminal emulator)|Terminator]] generate <code>SS3 1; ''modifiers'' ''char''</code> when {{keypress|F1|F4|chain={{sp}}–{{sp}}}} are pressed with modifiers. The faulty behavior was copied from [[GNOME Terminal]].{{Citation needed|date=December 2010}} * xterm replies <code>CSI ''row'' ; ''column'' R</code> if asked for cursor position and <code>CSI 1 ; ''modifiers'' R</code> if the {{keypress|F3}} key is pressed with modifiers, which collide in the case of <code>''row'' == 1</code>. This can be avoided by using the ''?'' private modifier as <code>CSI ? 6 n</code>, which will be reflected in the response as <code>CSI ? ''row'' ; ''column'' R</code>. * many terminals prepend <code>ESC</code> to any character that is typed with the alt key down. This creates ambiguity for uppercase letters and symbols <code>@[\]^_</code>, which would form C1 codes.{{clarify|date=November 2010}} * [[Konsole]] generates <code>SS3 ''modifiers'' ''char''</code> when {{keypress|F1|F4|chain={{sp}}–{{sp}}}} are pressed with modifiers.{{clarify|date=November 2010}} * [[iTerm2]] supports reporting additional keys via an enhanced CSI u mode.<ref>{{cite web |url=https://iterm2.com/documentation-csiu.html |title=CSI u - Documentation - iTerm2 - macOS Terminal Replacement |author=<!--Not stated--> |website=iTerm2 |access-date=15 Aug 2023}}</ref> == See also == * [[ANSI art]] * [[Control character]] * [[Advanced Video Attribute Terminal Assembler and Recreator]] (AVATAR) * [[ISO/IEC JTC 1/SC 2]] * [[C0 and C1 control codes]] == Notes == {{Notelist}} == References == {{Reflist|refs= <ref name="ECMA-48 (1979)">{{cite web |url=https://www.ecma-international.org/wp-content/uploads/ECMA-48_2nd_edition_august_1979.pdf |title=Standard ECMA-48: Control Functions for Character-Imaging I/O Devices |edition=Second |at=Brief History |date=August 1979 |institution=[[Ecma International]]}}</ref> <ref name="ECMA-48">{{cite web |url=https://www.ecma-international.org/wp-content/uploads/ECMA-48_5th_edition_june_1991.pdf |title=Standard ECMA-48: Control Functions for Coded Character Sets |edition=Fifth |date=June 1991 |institution=[[Ecma International]]}}</ref> <ref name="ECMA-35">{{cite web |url=https://www.ecma-international.org/wp-content/uploads/ECMA-35_6th_edition_december_1994.pdf |title=Standard ECMA-35: Character Code Structure and Extension Techniques |edition=Sixth |date=1994 |institution=[[Ecma International]]}}</ref> <ref name="Williams_2006_VT">{{cite web |url=https://vt100.net/dec/vt_history |title=Digital's Video Terminals |publisher=VT100.net |author-first=Paul |author-last=Williams |date=2006 |access-date=2011-08-17 }}</ref> }} == External links == * [https://www.ecma-international.org/publications-and-standards/standards/ecma-48/ Standard ECMA-48, Control Functions For Coded Character Sets]. (''5th edition, June 1991''), European Computer Manufacturers Association, Geneva 1991 (also published by ISO and IEC as standard ISO/IEC 6429) * [http://vt100.net/docs/ vt100.net DEC Documents] * {{Cite web |url=http://enterprise.aacc.cc.md.us/~rhs/ansi.html |title=ANSI.SYS -- ansi terminal emulation escape sequences |access-date=22 February 2007 |archive-url=https://web.archive.org/web/20060206022229/http://enterprise.aacc.cc.md.us/~rhs/ansi.html |archive-date=6 February 2006 |url-status=dead |df=dmy-all }} * [http://invisible-island.net/xterm/ctlseqs/ctlseqs.html Xterm / Escape Sequences] * [https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/a_commands/aixterm.html AIXterm / Escape Sequences] * [http://bjh21.me.uk/all-escapes/all-escapes.txt A collection of escape sequences for terminals that are vaguely compliant with ECMA-48 and friends.] * {{cite web|url=http://ascii-table.com/ansi-escape-sequences.php|title=ANSI Escape Sequences|archive-url=https://web.archive.org/web/20110525032501/http://ascii-table.com/ansi-escape-sequences.php|archive-date=25 May 2011}} * [https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-T.416-199303-I!!PDF-E&type=items ITU-T Rec. T.416 (03/93) Information technology – Open Document Architecture (ODA) and interchange format: Character content architectures] {{Character encoding}} {{Ecma International Standards}} {{ISO standards}} {{List of International Electrotechnical Commission standards}} [[Category:Computer standards]] [[Category:Ecma standards]] [[Category:American National Standards Institute standards]] [[Category:ISO standards]] [[Category:Text user interface]] </textarea><div class="templatesUsed"><div class="mw-templatesUsedExplanation"><p><span id="templatesused">Pages transcluded onto the current version of this page<span class="posteditwindowhelplinks"> (<a href="/wiki/Help:Transclusion" title="Help:Transclusion">help</a>)</span>:</span> </p></div><ul> <li><a href="/wiki/ANSI_code" class="mw-redirect" title="ANSI code">ANSI code</a> (<a href="/w/index.php?title=ANSI_code&action=edit" class="mw-redirect" title="ANSI code">edit</a>) </li><li><a href="/wiki/Template:Abbr" title="Template:Abbr">Template:Abbr</a> (<a href="/w/index.php?title=Template:Abbr&action=edit" title="Template:Abbr">view source</a>) (protected)</li><li><a href="/wiki/Template:Ambox" title="Template:Ambox">Template:Ambox</a> (<a href="/w/index.php?title=Template:Ambox&action=edit" title="Template:Ambox">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Anchor" title="Template:Anchor">Template:Anchor</a> (<a href="/w/index.php?title=Template:Anchor&action=edit" title="Template:Anchor">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Angbr" class="mw-redirect" title="Template:Angbr">Template:Angbr</a> (<a href="/w/index.php?title=Template:Angbr&action=edit" class="mw-redirect" title="Template:Angbr">view source</a>) (semi-protected)</li><li><a href="/wiki/Template:Angle_bracket" title="Template:Angle bracket">Template:Angle bracket</a> (<a href="/w/index.php?title=Template:Angle_bracket&action=edit" title="Template:Angle bracket">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Better_source_needed" title="Template:Better source needed">Template:Better source needed</a> (<a href="/w/index.php?title=Template:Better_source_needed&action=edit" title="Template:Better source needed">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Category_handler" title="Template:Category handler">Template:Category handler</a> (<a href="/w/index.php?title=Template:Category_handler&action=edit" title="Template:Category handler">view source</a>) (protected)</li><li><a href="/wiki/Template:Character_encoding" class="mw-redirect" title="Template:Character encoding">Template:Character encoding</a> (<a href="/w/index.php?title=Template:Character_encoding&action=edit" class="mw-redirect" title="Template:Character encoding">view source</a>) (semi-protected)</li><li><a href="/wiki/Template:Character_encodings" title="Template:Character encodings">Template:Character encodings</a> (<a href="/w/index.php?title=Template:Character_encodings&action=edit" title="Template:Character encodings">view source</a>) (semi-protected)</li><li><a href="/wiki/Template:Citation" title="Template:Citation">Template:Citation</a> (<a href="/w/index.php?title=Template:Citation&action=edit" title="Template:Citation">view source</a>) (protected)</li><li><a href="/wiki/Template:Citation_needed" title="Template:Citation needed">Template:Citation needed</a> (<a href="/w/index.php?title=Template:Citation_needed&action=edit" title="Template:Citation needed">view source</a>) (protected)</li><li><a href="/wiki/Template:Cite_book" title="Template:Cite book">Template:Cite book</a> (<a href="/w/index.php?title=Template:Cite_book&action=edit" title="Template:Cite book">view source</a>) (protected)</li><li><a href="/wiki/Template:Cite_manual" class="mw-redirect" title="Template:Cite manual">Template:Cite manual</a> (<a href="/w/index.php?title=Template:Cite_manual&action=edit" class="mw-redirect" title="Template:Cite manual">view source</a>) (semi-protected)</li><li><a href="/wiki/Template:Cite_web" title="Template:Cite web">Template:Cite web</a> (<a href="/w/index.php?title=Template:Cite_web&action=edit" title="Template:Cite web">view source</a>) (protected)</li><li><a href="/wiki/Template:Clarify" title="Template:Clarify">Template:Clarify</a> (<a href="/w/index.php?title=Template:Clarify&action=edit" title="Template:Clarify">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Cn" class="mw-redirect" title="Template:Cn">Template:Cn</a> (<a href="/w/index.php?title=Template:Cn&action=edit" class="mw-redirect" title="Template:Cn">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Code" title="Template:Code">Template:Code</a> (<a href="/w/index.php?title=Template:Code&action=edit" title="Template:Code">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Codett" title="Template:Codett">Template:Codett</a> (<a href="/w/index.php?title=Template:Codett&action=edit" title="Template:Codett">edit</a>) </li><li><a href="/wiki/Template:Control_code_link" title="Template:Control code link">Template:Control code link</a> (<a href="/w/index.php?title=Template:Control_code_link&action=edit" title="Template:Control code link">edit</a>) </li><li><a href="/wiki/Template:Control_code_link/alias" title="Template:Control code link/alias">Template:Control code link/alias</a> (<a href="/w/index.php?title=Template:Control_code_link/alias&action=edit" title="Template:Control code link/alias">edit</a>) </li><li><a href="/wiki/Template:Control_code_link/styles.css" title="Template:Control code link/styles.css">Template:Control code link/styles.css</a> (<a href="/w/index.php?title=Template:Control_code_link/styles.css&action=edit" title="Template:Control code link/styles.css">edit</a>) </li><li><a href="/wiki/Template:Ctrl" class="mw-redirect" title="Template:Ctrl">Template:Ctrl</a> (<a href="/w/index.php?title=Template:Ctrl&action=edit" class="mw-redirect" title="Template:Ctrl">edit</a>) </li><li><a href="/wiki/Template:DMCA" class="mw-redirect" title="Template:DMCA">Template:DMCA</a> (<a href="/w/index.php?title=Template:DMCA&action=edit" class="mw-redirect" title="Template:DMCA">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Dated_maintenance_category" title="Template:Dated maintenance category">Template:Dated maintenance category</a> (<a href="/w/index.php?title=Template:Dated_maintenance_category&action=edit" title="Template:Dated maintenance category">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Dated_maintenance_category_(articles)" title="Template:Dated maintenance category (articles)">Template:Dated maintenance category (articles)</a> (<a href="/w/index.php?title=Template:Dated_maintenance_category_(articles)&action=edit" title="Template:Dated maintenance category (articles)">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Dead_link" title="Template:Dead link">Template:Dead link</a> (<a href="/w/index.php?title=Template:Dead_link&action=edit" title="Template:Dead link">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Delink" title="Template:Delink">Template:Delink</a> (<a href="/w/index.php?title=Template:Delink&action=edit" title="Template:Delink">view source</a>) (protected)</li><li><a href="/wiki/Template:Discuss" title="Template:Discuss">Template:Discuss</a> (<a href="/w/index.php?title=Template:Discuss&action=edit" title="Template:Discuss">view source</a>) (semi-protected)</li><li><a href="/wiki/Template:Dubious" title="Template:Dubious">Template:Dubious</a> (<a href="/w/index.php?title=Template:Dubious&action=edit" title="Template:Dubious">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Ecma_International_Standards" title="Template:Ecma International Standards">Template:Ecma International Standards</a> (<a href="/w/index.php?title=Template:Ecma_International_Standards&action=edit" title="Template:Ecma International Standards">edit</a>) </li><li><a href="/wiki/Template:Efn" title="Template:Efn">Template:Efn</a> (<a href="/w/index.php?title=Template:Efn&action=edit" title="Template:Efn">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:FULLROOTPAGENAME" title="Template:FULLROOTPAGENAME">Template:FULLROOTPAGENAME</a> (<a href="/w/index.php?title=Template:FULLROOTPAGENAME&action=edit" title="Template:FULLROOTPAGENAME">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Find_sources_mainspace" title="Template:Find sources mainspace">Template:Find sources mainspace</a> (<a href="/w/index.php?title=Template:Find_sources_mainspace&action=edit" title="Template:Find sources mainspace">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Fix" title="Template:Fix">Template:Fix</a> (<a href="/w/index.php?title=Template:Fix&action=edit" title="Template:Fix">view source</a>) (protected)</li><li><a href="/wiki/Template:Fix-span" title="Template:Fix-span">Template:Fix-span</a> (<a href="/w/index.php?title=Template:Fix-span&action=edit" title="Template:Fix-span">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Fix/category" title="Template:Fix/category">Template:Fix/category</a> (<a href="/w/index.php?title=Template:Fix/category&action=edit" title="Template:Fix/category">view source</a>) (protected)</li><li><a href="/wiki/Template:Hlist" title="Template:Hlist">Template:Hlist</a> (<a href="/w/index.php?title=Template:Hlist&action=edit" title="Template:Hlist">view source</a>) (protected)</li><li><a href="/wiki/Template:Hlist/styles.css" title="Template:Hlist/styles.css">Template:Hlist/styles.css</a> (<a href="/w/index.php?title=Template:Hlist/styles.css&action=edit" title="Template:Hlist/styles.css">view source</a>) (protected)</li><li><a href="/wiki/Template:Hr" title="Template:Hr">Template:Hr</a> (<a href="/w/index.php?title=Template:Hr&action=edit" title="Template:Hr">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:ISO_standards" title="Template:ISO standards">Template:ISO standards</a> (<a href="/w/index.php?title=Template:ISO_standards&action=edit" title="Template:ISO standards">view source</a>) (semi-protected)</li><li><a href="/wiki/Template:Icon" title="Template:Icon">Template:Icon</a> (<a href="/w/index.php?title=Template:Icon&action=edit" title="Template:Icon">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Ifsubst" title="Template:Ifsubst">Template:Ifsubst</a> (<a href="/w/index.php?title=Template:Ifsubst&action=edit" title="Template:Ifsubst">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Infobox" title="Template:Infobox">Template:Infobox</a> (<a href="/w/index.php?title=Template:Infobox&action=edit" title="Template:Infobox">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Infobox_character_encoding" title="Template:Infobox character encoding">Template:Infobox character encoding</a> (<a href="/w/index.php?title=Template:Infobox_character_encoding&action=edit" title="Template:Infobox character encoding">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Key_press" title="Template:Key press">Template:Key press</a> (<a href="/w/index.php?title=Template:Key_press&action=edit" title="Template:Key press">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Key_press/styles.css" title="Template:Key press/styles.css">Template:Key press/styles.css</a> (<a href="/w/index.php?title=Template:Key_press/styles.css&action=edit" title="Template:Key press/styles.css">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Keypress" class="mw-redirect" title="Template:Keypress">Template:Keypress</a> (<a href="/w/index.php?title=Template:Keypress&action=edit" class="mw-redirect" title="Template:Keypress">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Last_word" title="Template:Last word">Template:Last word</a> (<a href="/w/index.php?title=Template:Last_word&action=edit" title="Template:Last word">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:List_of_IEC_standards" title="Template:List of IEC standards">Template:List of IEC standards</a> (<a href="/w/index.php?title=Template:List_of_IEC_standards&action=edit" title="Template:List of IEC standards">edit</a>) </li><li><a href="/wiki/Template:List_of_International_Electrotechnical_Commission_standards" class="mw-redirect" title="Template:List of International Electrotechnical Commission standards">Template:List of International Electrotechnical Commission standards</a> (<a href="/w/index.php?title=Template:List_of_International_Electrotechnical_Commission_standards&action=edit" class="mw-redirect" title="Template:List of International Electrotechnical Commission standards">edit</a>) </li><li><a href="/wiki/Template:Main_other" title="Template:Main other">Template:Main other</a> (<a href="/w/index.php?title=Template:Main_other&action=edit" title="Template:Main other">view source</a>) (protected)</li><li><a href="/wiki/Template:Math" title="Template:Math">Template:Math</a> (<a href="/w/index.php?title=Template:Math&action=edit" title="Template:Math">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Mono" title="Template:Mono">Template:Mono</a> (<a href="/w/index.php?title=Template:Mono&action=edit" title="Template:Mono">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Mono/styles.css" title="Template:Mono/styles.css">Template:Mono/styles.css</a> (<a href="/w/index.php?title=Template:Mono/styles.css&action=edit" title="Template:Mono/styles.css">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:More_citations_needed" title="Template:More citations needed">Template:More citations needed</a> (<a href="/w/index.php?title=Template:More_citations_needed&action=edit" title="Template:More citations needed">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Narrow_no-break_space" title="Template:Narrow no-break space">Template:Narrow no-break space</a> (<a href="/w/index.php?title=Template:Narrow_no-break_space&action=edit" title="Template:Narrow no-break space">view source</a>) (semi-protected)</li><li><a href="/wiki/Template:Navbox" title="Template:Navbox">Template:Navbox</a> (<a href="/w/index.php?title=Template:Navbox&action=edit" title="Template:Navbox">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Nnbsp" class="mw-redirect" title="Template:Nnbsp">Template:Nnbsp</a> (<a href="/w/index.php?title=Template:Nnbsp&action=edit" class="mw-redirect" title="Template:Nnbsp">view source</a>) (semi-protected)</li><li><a href="/wiki/Template:Nobold" title="Template:Nobold">Template:Nobold</a> (<a href="/w/index.php?title=Template:Nobold&action=edit" title="Template:Nobold">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Nobold/styles.css" title="Template:Nobold/styles.css">Template:Nobold/styles.css</a> (<a href="/w/index.php?title=Template:Nobold/styles.css&action=edit" title="Template:Nobold/styles.css">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Nobr" class="mw-redirect" title="Template:Nobr">Template:Nobr</a> (<a href="/w/index.php?title=Template:Nobr&action=edit" class="mw-redirect" title="Template:Nobr">view source</a>) (protected)</li><li><a href="/wiki/Template:Notelist" title="Template:Notelist">Template:Notelist</a> (<a href="/w/index.php?title=Template:Notelist&action=edit" title="Template:Notelist">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Nowrap" title="Template:Nowrap">Template:Nowrap</a> (<a href="/w/index.php?title=Template:Nowrap&action=edit" title="Template:Nowrap">view source</a>) (protected)</li><li><a href="/wiki/Template:Ns_has_subpages" title="Template:Ns has subpages">Template:Ns has subpages</a> (<a href="/w/index.php?title=Template:Ns_has_subpages&action=edit" title="Template:Ns has subpages">view source</a>) (protected)</li><li><a href="/wiki/Template:Pagetype" title="Template:Pagetype">Template:Pagetype</a> (<a href="/w/index.php?title=Template:Pagetype&action=edit" title="Template:Pagetype">view source</a>) (protected)</li><li><a href="/wiki/Template:Plainlist" title="Template:Plainlist">Template:Plainlist</a> (<a href="/w/index.php?title=Template:Plainlist&action=edit" title="Template:Plainlist">view source</a>) (protected)</li><li><a href="/wiki/Template:Plainlist/styles.css" title="Template:Plainlist/styles.css">Template:Plainlist/styles.css</a> (<a href="/w/index.php?title=Template:Plainlist/styles.css&action=edit" title="Template:Plainlist/styles.css">view source</a>) (protected)</li><li><a href="/wiki/Template:Pre" title="Template:Pre">Template:Pre</a> (<a href="/w/index.php?title=Template:Pre&action=edit" title="Template:Pre">view source</a>) (semi-protected)</li><li><a href="/wiki/Template:Pre/styles.css" title="Template:Pre/styles.css">Template:Pre/styles.css</a> (<a href="/w/index.php?title=Template:Pre/styles.css&action=edit" title="Template:Pre/styles.css">view source</a>) (semi-protected)</li><li><a href="/wiki/Template:Px2" class="mw-redirect" title="Template:Px2">Template:Px2</a> (<a href="/w/index.php?title=Template:Px2&action=edit" class="mw-redirect" title="Template:Px2">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:R/superscript" title="Template:R/superscript">Template:R/superscript</a> (<a href="/w/index.php?title=Template:R/superscript&action=edit" title="Template:R/superscript">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:R/where" title="Template:R/where">Template:R/where</a> (<a href="/w/index.php?title=Template:R/where&action=edit" title="Template:R/where">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Redirect" title="Template:Redirect">Template:Redirect</a> (<a href="/w/index.php?title=Template:Redirect&action=edit" title="Template:Redirect">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Reference_page" title="Template:Reference page">Template:Reference page</a> (<a href="/w/index.php?title=Template:Reference_page&action=edit" title="Template:Reference page">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Reflist" title="Template:Reflist">Template:Reflist</a> (<a href="/w/index.php?title=Template:Reflist&action=edit" title="Template:Reflist">view source</a>) (protected)</li><li><a href="/wiki/Template:Reflist/styles.css" title="Template:Reflist/styles.css">Template:Reflist/styles.css</a> (<a href="/w/index.php?title=Template:Reflist/styles.css&action=edit" title="Template:Reflist/styles.css">view source</a>) (protected)</li><li><a href="/wiki/Template:Rp" class="mw-redirect" title="Template:Rp">Template:Rp</a> (<a href="/w/index.php?title=Template:Rp&action=edit" class="mw-redirect" title="Template:Rp">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:SDcat" title="Template:SDcat">Template:SDcat</a> (<a href="/w/index.php?title=Template:SDcat&action=edit" title="Template:SDcat">view source</a>) (protected)</li><li><a href="/wiki/Template:Short_description" title="Template:Short description">Template:Short description</a> (<a href="/w/index.php?title=Template:Short_description&action=edit" title="Template:Short description">view source</a>) (protected)</li><li><a href="/wiki/Template:Short_description/lowercasecheck" title="Template:Short description/lowercasecheck">Template:Short description/lowercasecheck</a> (<a href="/w/index.php?title=Template:Short_description/lowercasecheck&action=edit" title="Template:Short description/lowercasecheck">view source</a>) (protected)</li><li><a href="/wiki/Template:Sp" title="Template:Sp">Template:Sp</a> (<a href="/w/index.php?title=Template:Sp&action=edit" title="Template:Sp">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Sxhl" class="mw-redirect" title="Template:Sxhl">Template:Sxhl</a> (<a href="/w/index.php?title=Template:Sxhl&action=edit" class="mw-redirect" title="Template:Sxhl">edit</a>) </li><li><a href="/wiki/Template:Syntaxhighlight" title="Template:Syntaxhighlight">Template:Syntaxhighlight</a> (<a href="/w/index.php?title=Template:Syntaxhighlight&action=edit" title="Template:Syntaxhighlight">view source</a>) (semi-protected)</li><li><a href="/wiki/Template:Template_other" title="Template:Template other">Template:Template other</a> (<a href="/w/index.php?title=Template:Template_other&action=edit" title="Template:Template other">view source</a>) (protected)</li><li><a href="/wiki/Template:Thin_space" title="Template:Thin space">Template:Thin space</a> (<a href="/w/index.php?title=Template:Thin_space&action=edit" title="Template:Thin space">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Tt" class="mw-redirect" title="Template:Tt">Template:Tt</a> (<a href="/w/index.php?title=Template:Tt&action=edit" class="mw-redirect" title="Template:Tt">view source</a>) (semi-protected)</li><li><a href="/wiki/Template:Two_pixel_space" title="Template:Two pixel space">Template:Two pixel space</a> (<a href="/w/index.php?title=Template:Two_pixel_space&action=edit" title="Template:Two pixel space">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Use_dmy_dates" title="Template:Use dmy dates">Template:Use dmy dates</a> (<a href="/w/index.php?title=Template:Use_dmy_dates&action=edit" title="Template:Use dmy dates">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Var" title="Template:Var">Template:Var</a> (<a href="/w/index.php?title=Template:Var&action=edit" title="Template:Var">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Visible_anchor" title="Template:Visible anchor">Template:Visible anchor</a> (<a href="/w/index.php?title=Template:Visible_anchor&action=edit" title="Template:Visible anchor">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Visible_anchor/styles.css" title="Template:Visible anchor/styles.css">Template:Visible anchor/styles.css</a> (<a href="/w/index.php?title=Template:Visible_anchor/styles.css&action=edit" title="Template:Visible anchor/styles.css">view source</a>) (template editor protected)</li><li><a href="/wiki/Template:Yesno" title="Template:Yesno">Template:Yesno</a> (<a href="/w/index.php?title=Template:Yesno&action=edit" title="Template:Yesno">view source</a>) (protected)</li><li><a href="/wiki/Template:Zero_width_joiner" title="Template:Zero width joiner">Template:Zero width joiner</a> (<a href="/w/index.php?title=Template:Zero_width_joiner&action=edit" title="Template:Zero width joiner">view source</a>) (extended confirmed protected)</li><li><a href="/wiki/Module:Anchor" title="Module:Anchor">Module:Anchor</a> (<a href="/w/index.php?title=Module:Anchor&action=edit" title="Module:Anchor">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Arguments" title="Module:Arguments">Module:Arguments</a> (<a href="/w/index.php?title=Module:Arguments&action=edit" title="Module:Arguments">view source</a>) (protected)</li><li><a href="/wiki/Module:Category_handler" title="Module:Category handler">Module:Category handler</a> (<a href="/w/index.php?title=Module:Category_handler&action=edit" title="Module:Category handler">view source</a>) (protected)</li><li><a href="/wiki/Module:Category_handler/blacklist" title="Module:Category handler/blacklist">Module:Category handler/blacklist</a> (<a href="/w/index.php?title=Module:Category_handler/blacklist&action=edit" title="Module:Category handler/blacklist">view source</a>) (protected)</li><li><a href="/wiki/Module:Category_handler/config" title="Module:Category handler/config">Module:Category handler/config</a> (<a href="/w/index.php?title=Module:Category_handler/config&action=edit" title="Module:Category handler/config">view source</a>) (protected)</li><li><a href="/wiki/Module:Category_handler/data" title="Module:Category handler/data">Module:Category handler/data</a> (<a href="/w/index.php?title=Module:Category_handler/data&action=edit" title="Module:Category handler/data">view source</a>) (protected)</li><li><a href="/wiki/Module:Category_handler/shared" title="Module:Category handler/shared">Module:Category handler/shared</a> (<a href="/w/index.php?title=Module:Category_handler/shared&action=edit" title="Module:Category handler/shared">view source</a>) (protected)</li><li><a href="/wiki/Module:Check_for_unknown_parameters" title="Module:Check for unknown parameters">Module:Check for unknown parameters</a> (<a href="/w/index.php?title=Module:Check_for_unknown_parameters&action=edit" title="Module:Check for unknown parameters">view source</a>) (protected)</li><li><a href="/wiki/Module:Citation/CS1" title="Module:Citation/CS1">Module:Citation/CS1</a> (<a href="/w/index.php?title=Module:Citation/CS1&action=edit" title="Module:Citation/CS1">view source</a>) (protected)</li><li><a href="/wiki/Module:Citation/CS1/COinS" title="Module:Citation/CS1/COinS">Module:Citation/CS1/COinS</a> (<a href="/w/index.php?title=Module:Citation/CS1/COinS&action=edit" title="Module:Citation/CS1/COinS">view source</a>) (protected)</li><li><a href="/wiki/Module:Citation/CS1/Configuration" title="Module:Citation/CS1/Configuration">Module:Citation/CS1/Configuration</a> (<a href="/w/index.php?title=Module:Citation/CS1/Configuration&action=edit" title="Module:Citation/CS1/Configuration">view source</a>) (protected)</li><li><a href="/wiki/Module:Citation/CS1/Date_validation" title="Module:Citation/CS1/Date validation">Module:Citation/CS1/Date validation</a> (<a href="/w/index.php?title=Module:Citation/CS1/Date_validation&action=edit" title="Module:Citation/CS1/Date validation">view source</a>) (protected)</li><li><a href="/wiki/Module:Citation/CS1/Identifiers" title="Module:Citation/CS1/Identifiers">Module:Citation/CS1/Identifiers</a> (<a href="/w/index.php?title=Module:Citation/CS1/Identifiers&action=edit" title="Module:Citation/CS1/Identifiers">view source</a>) (protected)</li><li><a href="/wiki/Module:Citation/CS1/Utilities" title="Module:Citation/CS1/Utilities">Module:Citation/CS1/Utilities</a> (<a href="/w/index.php?title=Module:Citation/CS1/Utilities&action=edit" title="Module:Citation/CS1/Utilities">view source</a>) (protected)</li><li><a href="/wiki/Module:Citation/CS1/Whitelist" title="Module:Citation/CS1/Whitelist">Module:Citation/CS1/Whitelist</a> (<a href="/w/index.php?title=Module:Citation/CS1/Whitelist&action=edit" title="Module:Citation/CS1/Whitelist">view source</a>) (protected)</li><li><a href="/wiki/Module:Citation/CS1/styles.css" title="Module:Citation/CS1/styles.css">Module:Citation/CS1/styles.css</a> (<a href="/w/index.php?title=Module:Citation/CS1/styles.css&action=edit" title="Module:Citation/CS1/styles.css">view source</a>) (protected)</li><li><a href="/wiki/Module:DecodeEncode" title="Module:DecodeEncode">Module:DecodeEncode</a> (<a href="/w/index.php?title=Module:DecodeEncode&action=edit" title="Module:DecodeEncode">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Delink" title="Module:Delink">Module:Delink</a> (<a href="/w/index.php?title=Module:Delink&action=edit" title="Module:Delink">view source</a>) (protected)</li><li><a href="/wiki/Module:Disambiguation/templates" title="Module:Disambiguation/templates">Module:Disambiguation/templates</a> (<a href="/w/index.php?title=Module:Disambiguation/templates&action=edit" title="Module:Disambiguation/templates">view source</a>) (protected)</li><li><a href="/wiki/Module:Find_sources" title="Module:Find sources">Module:Find sources</a> (<a href="/w/index.php?title=Module:Find_sources&action=edit" title="Module:Find sources">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Find_sources/config" title="Module:Find sources/config">Module:Find sources/config</a> (<a href="/w/index.php?title=Module:Find_sources/config&action=edit" title="Module:Find sources/config">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Find_sources/links" title="Module:Find sources/links">Module:Find sources/links</a> (<a href="/w/index.php?title=Module:Find_sources/links&action=edit" title="Module:Find sources/links">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Find_sources/templates/Find_sources_mainspace" title="Module:Find sources/templates/Find sources mainspace">Module:Find sources/templates/Find sources mainspace</a> (<a href="/w/index.php?title=Module:Find_sources/templates/Find_sources_mainspace&action=edit" title="Module:Find sources/templates/Find sources mainspace">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Format_link" title="Module:Format link">Module:Format link</a> (<a href="/w/index.php?title=Module:Format_link&action=edit" title="Module:Format link">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:GetParameters" title="Module:GetParameters">Module:GetParameters</a> (<a href="/w/index.php?title=Module:GetParameters&action=edit" title="Module:GetParameters">view source</a>) (protected)</li><li><a href="/wiki/Module:Hatnote" title="Module:Hatnote">Module:Hatnote</a> (<a href="/w/index.php?title=Module:Hatnote&action=edit" title="Module:Hatnote">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Hatnote/styles.css" title="Module:Hatnote/styles.css">Module:Hatnote/styles.css</a> (<a href="/w/index.php?title=Module:Hatnote/styles.css&action=edit" title="Module:Hatnote/styles.css">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Hatnote_list" title="Module:Hatnote list">Module:Hatnote list</a> (<a href="/w/index.php?title=Module:Hatnote_list&action=edit" title="Module:Hatnote list">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Icon" title="Module:Icon">Module:Icon</a> (<a href="/w/index.php?title=Module:Icon&action=edit" title="Module:Icon">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Icon/data" title="Module:Icon/data">Module:Icon/data</a> (<a href="/w/index.php?title=Module:Icon/data&action=edit" title="Module:Icon/data">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Infobox" title="Module:Infobox">Module:Infobox</a> (<a href="/w/index.php?title=Module:Infobox&action=edit" title="Module:Infobox">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Infobox/styles.css" title="Module:Infobox/styles.css">Module:Infobox/styles.css</a> (<a href="/w/index.php?title=Module:Infobox/styles.css&action=edit" title="Module:Infobox/styles.css">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Key" title="Module:Key">Module:Key</a> (<a href="/w/index.php?title=Module:Key&action=edit" title="Module:Key">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:List" title="Module:List">Module:List</a> (<a href="/w/index.php?title=Module:List&action=edit" title="Module:List">view source</a>) (protected)</li><li><a href="/wiki/Module:Message_box" title="Module:Message box">Module:Message box</a> (<a href="/w/index.php?title=Module:Message_box&action=edit" title="Module:Message box">view source</a>) (protected)</li><li><a href="/wiki/Module:Message_box/ambox.css" title="Module:Message box/ambox.css">Module:Message box/ambox.css</a> (<a href="/w/index.php?title=Module:Message_box/ambox.css&action=edit" title="Module:Message box/ambox.css">view source</a>) (protected)</li><li><a href="/wiki/Module:Message_box/configuration" title="Module:Message box/configuration">Module:Message box/configuration</a> (<a href="/w/index.php?title=Module:Message_box/configuration&action=edit" title="Module:Message box/configuration">view source</a>) (protected)</li><li><a href="/wiki/Module:Namespace_detect/config" title="Module:Namespace detect/config">Module:Namespace detect/config</a> (<a href="/w/index.php?title=Module:Namespace_detect/config&action=edit" title="Module:Namespace detect/config">view source</a>) (protected)</li><li><a href="/wiki/Module:Namespace_detect/data" title="Module:Namespace detect/data">Module:Namespace detect/data</a> (<a href="/w/index.php?title=Module:Namespace_detect/data&action=edit" title="Module:Namespace detect/data">view source</a>) (protected)</li><li><a href="/wiki/Module:Navbar" title="Module:Navbar">Module:Navbar</a> (<a href="/w/index.php?title=Module:Navbar&action=edit" title="Module:Navbar">view source</a>) (protected)</li><li><a href="/wiki/Module:Navbar/configuration" title="Module:Navbar/configuration">Module:Navbar/configuration</a> (<a href="/w/index.php?title=Module:Navbar/configuration&action=edit" title="Module:Navbar/configuration">view source</a>) (protected)</li><li><a href="/wiki/Module:Navbar/styles.css" title="Module:Navbar/styles.css">Module:Navbar/styles.css</a> (<a href="/w/index.php?title=Module:Navbar/styles.css&action=edit" title="Module:Navbar/styles.css">view source</a>) (protected)</li><li><a href="/wiki/Module:Navbox" title="Module:Navbox">Module:Navbox</a> (<a href="/w/index.php?title=Module:Navbox&action=edit" title="Module:Navbox">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Navbox/configuration" title="Module:Navbox/configuration">Module:Navbox/configuration</a> (<a href="/w/index.php?title=Module:Navbox/configuration&action=edit" title="Module:Navbox/configuration">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Navbox/styles.css" title="Module:Navbox/styles.css">Module:Navbox/styles.css</a> (<a href="/w/index.php?title=Module:Navbox/styles.css&action=edit" title="Module:Navbox/styles.css">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Ns_has_subpages" title="Module:Ns has subpages">Module:Ns has subpages</a> (<a href="/w/index.php?title=Module:Ns_has_subpages&action=edit" title="Module:Ns has subpages">view source</a>) (protected)</li><li><a href="/wiki/Module:Pagetype" title="Module:Pagetype">Module:Pagetype</a> (<a href="/w/index.php?title=Module:Pagetype&action=edit" title="Module:Pagetype">view source</a>) (protected)</li><li><a href="/wiki/Module:Pagetype/config" title="Module:Pagetype/config">Module:Pagetype/config</a> (<a href="/w/index.php?title=Module:Pagetype/config&action=edit" title="Module:Pagetype/config">view source</a>) (protected)</li><li><a href="/wiki/Module:Pagetype/disambiguation" class="mw-redirect" title="Module:Pagetype/disambiguation">Module:Pagetype/disambiguation</a> (<a href="/w/index.php?title=Module:Pagetype/disambiguation&action=edit" class="mw-redirect" title="Module:Pagetype/disambiguation">view source</a>) (protected)</li><li><a href="/wiki/Module:Pagetype/rfd" title="Module:Pagetype/rfd">Module:Pagetype/rfd</a> (<a href="/w/index.php?title=Module:Pagetype/rfd&action=edit" title="Module:Pagetype/rfd">view source</a>) (protected)</li><li><a href="/wiki/Module:Pagetype/setindex" title="Module:Pagetype/setindex">Module:Pagetype/setindex</a> (<a href="/w/index.php?title=Module:Pagetype/setindex&action=edit" title="Module:Pagetype/setindex">view source</a>) (protected)</li><li><a href="/wiki/Module:Pagetype/softredirect" title="Module:Pagetype/softredirect">Module:Pagetype/softredirect</a> (<a href="/w/index.php?title=Module:Pagetype/softredirect&action=edit" title="Module:Pagetype/softredirect">view source</a>) (protected)</li><li><a href="/wiki/Module:Plain_text" title="Module:Plain text">Module:Plain text</a> (<a href="/w/index.php?title=Module:Plain_text&action=edit" title="Module:Plain text">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:Redirect_hatnote" title="Module:Redirect hatnote">Module:Redirect hatnote</a> (<a href="/w/index.php?title=Module:Redirect_hatnote&action=edit" title="Module:Redirect hatnote">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:SDcat" title="Module:SDcat">Module:SDcat</a> (<a href="/w/index.php?title=Module:SDcat&action=edit" title="Module:SDcat">view source</a>) (protected)</li><li><a href="/wiki/Module:String" title="Module:String">Module:String</a> (<a href="/w/index.php?title=Module:String&action=edit" title="Module:String">view source</a>) (protected)</li><li><a href="/wiki/Module:String2" title="Module:String2">Module:String2</a> (<a href="/w/index.php?title=Module:String2&action=edit" title="Module:String2">view source</a>) (template editor protected)</li><li><a href="/wiki/Module:TableTools" title="Module:TableTools">Module:TableTools</a> (<a href="/w/index.php?title=Module:TableTools&action=edit" title="Module:TableTools">view source</a>) (protected)</li><li><a href="/wiki/Module:Unsubst" title="Module:Unsubst">Module:Unsubst</a> (<a href="/w/index.php?title=Module:Unsubst&action=edit" title="Module:Unsubst">view source</a>) (protected)</li><li><a href="/wiki/Module:Wikitext_Parsing" title="Module:Wikitext Parsing">Module:Wikitext Parsing</a> (<a href="/w/index.php?title=Module:Wikitext_Parsing&action=edit" title="Module:Wikitext Parsing">view source</a>) (protected)</li><li><a href="/wiki/Module:Yesno" title="Module:Yesno">Module:Yesno</a> (<a href="/w/index.php?title=Module:Yesno&action=edit" title="Module:Yesno">view source</a>) (protected)</li></ul></div><p id="mw-returnto">Return to <a href="/wiki/ANSI_escape_code" title="ANSI escape code">ANSI escape code</a>.</p> <!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1&useformat=desktop" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/wiki/ANSI_escape_code">https://en.wikipedia.org/wiki/ANSI_escape_code</a>"</div></div> <div id="catlinks" class="catlinks catlinks-allhidden" data-mw="interface"></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=ANSI_escape_code&action=edit&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-5f58cd8b6-6wqtz","wgBackendResponseTime":416,"wgPageParseReport":{"limitreport":{"cputime":"0.048","walltime":"0.066","ppvisitednodes":{"value":418,"limit":1000000},"postexpandincludesize":{"value":17740,"limit":2097152},"templateargumentsize":{"value":6556,"limit":2097152},"expansiondepth":{"value":9,"limit":100},"expensivefunctioncount":{"value":0,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":469,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 45.271 1 -total"," 99.86% 45.206 2 Template:Blocked_text"," 40.04% 18.126 2 Template:Replace"," 39.15% 17.723 1 Template:Colocationwebhost"," 35.75% 16.185 1 Template:Hidden"," 15.04% 6.810 1 Template:Tlx"," 14.93% 6.759 1 Template:Hidden_begin"," 2.67% 1.209 1 MediaWiki:Wikimedia-globalblocking-blockedtext-mistake"," 2.51% 1.136 1 MediaWiki:Wikimedia-globalblocking-blockedtext-mistake-email-steward"," 2.17% 0.984 1 Template:Hidden_end"]},"scribunto":{"limitreport-timeusage":{"value":"0.010","limit":"10.000"},"limitreport-memusage":{"value":1043317,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-5f58cd8b6-6wqtz","timestamp":"20241203192319","ttl":2592000,"transientcontent":false}}});});</script> </body> </html>