<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="generator" content="ExDoc v0.19.1"> <title>IO.ANSI – Elixir v1.7.2</title> <link rel="stylesheet" href="dist/app-240d7fc7e5.css" /> <link rel="canonical" href="https://hexdocs.pm/elixir/v1.7/IO.ANSI.html" /> <script src="dist/sidebar_items-cdf4e58b19.js"></script> </head> <body data-type="modules"> <script>try { if(localStorage.getItem('night-mode')) document.body.className += ' night-mode'; } catch (e) { }</script> <div class="main"> <button class="sidebar-button sidebar-toggle"> <span class="icon-menu" aria-hidden="true"></span> <span class="sr-only">Toggle Sidebar</span> </button> <button class="sidebar-button night-mode-toggle"> <span class="icon-theme" aria-hidden="true"></span> <span class="sr-only">Toggle Theme</span> </button> <section class="sidebar"> <a href="http://elixir-lang.org/docs.html" class="sidebar-projectLink"> <div class="sidebar-projectDetails"> <h1 class="sidebar-projectName"> Elixir </h1> <h2 class="sidebar-projectVersion"> v1.7.2 </h2> </div> <img src="assets/logo.png" alt="Elixir" class="sidebar-projectImage"> </a> <form class="sidebar-search" action="search.html"> <button type="submit" class="search-button"> <span class="icon-search" aria-hidden="true"></span> </button> <input name="q" type="text" id="search-list" class="search-input" placeholder="Search" aria-label="Search" autocomplete="off" /> </form> <ul class="sidebar-listNav"> <li><a id="extras-list" href="#full-list">Pages</a></li> <li><a id="modules-list" href="#full-list">Modules</a></li> <li><a id="exceptions-list" href="#full-list">Exceptions</a></li> </ul> <div class="gradient"></div> <ul id="full-list" class="sidebar-fullList"></ul> </section> <section class="content"> <div class="content-outer"> <div id="content" class="content-inner"> <h1> <small class="visible-xs">Elixir v1.7.2</small> IO.ANSI <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L17" title="View Source" class="view-source" rel="help"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </h1> <section id="moduledoc"> <p>Functionality to render ANSI escape sequences.</p> <p><a href="https://en.wikipedia.org/wiki/ANSI_escape_code">ANSI escape sequences</a> are characters embedded in text used to control formatting, color, and other output options on video text terminals.</p> </section> <section id="summary" class="details-list"> <h1 class="section-heading"> <a class="hover-link" href="#summary"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this section</span> </a> Summary </h1> <div class="summary-types summary"> <h2> <a href="#types">Types</a> </h2> <div class="summary-row"> <div class="summary-signature"> <a href="#t:ansicode/0">ansicode()</a> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#t:ansidata/0">ansidata()</a> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#t:ansilist/0">ansilist()</a> </div> </div> </div> <div class="summary-functions summary"> <h2> <a href="#functions">Functions</a> </h2> <div class="summary-row"> <div class="summary-signature"> <a href="#black/0">black()</a> </div> <div class="summary-synopsis"><p>Sets foreground color to black</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#black_background/0">black_background()</a> </div> <div class="summary-synopsis"><p>Sets background color to black</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#blink_off/0">blink_off()</a> </div> <div class="summary-synopsis"><p>Blink: off</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#blink_rapid/0">blink_rapid()</a> </div> <div class="summary-synopsis"><p>Blink: rapid. MS-DOS ANSI.SYS; 150 per minute or more; not widely supported</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#blink_slow/0">blink_slow()</a> </div> <div class="summary-synopsis"><p>Blink: slow. Less than 150 per minute</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#blue/0">blue()</a> </div> <div class="summary-synopsis"><p>Sets foreground color to blue</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#blue_background/0">blue_background()</a> </div> <div class="summary-synopsis"><p>Sets background color to blue</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#bright/0">bright()</a> </div> <div class="summary-synopsis"><p>Bright (increased intensity) or bold</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#clear/0">clear()</a> </div> <div class="summary-synopsis"><p>Clears screen</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#clear_line/0">clear_line()</a> </div> <div class="summary-synopsis"><p>Clears line</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#color/1">color(code)</a> </div> <div class="summary-synopsis"><p>Sets foreground color</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#color/3">color(r, g, b)</a> </div> <div class="summary-synopsis"><p>Sets the foreground color from individual RGB values</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#color_background/1">color_background(code)</a> </div> <div class="summary-synopsis"><p>Sets background color</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#color_background/3">color_background(r, g, b)</a> </div> <div class="summary-synopsis"><p>Sets the background color from individual RGB values</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#conceal/0">conceal()</a> </div> <div class="summary-synopsis"><p>Conceal. Not widely supported</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#crossed_out/0">crossed_out()</a> </div> <div class="summary-synopsis"><p>Crossed-out. Characters legible, but marked for deletion. Not widely supported</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#cursor/2">cursor(line, column)</a> </div> <div class="summary-synopsis"><p>Sends cursor to the absolute position specified by <code class="inline">line</code> and <code class="inline">column</code></p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#cursor_down/1">cursor_down(lines \\ 1)</a> </div> <div class="summary-synopsis"><p>Sends cursor <code class="inline">lines</code> down</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#cursor_left/1">cursor_left(columns \\ 1)</a> </div> <div class="summary-synopsis"><p>Sends cursor <code class="inline">columns</code> to the left</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#cursor_right/1">cursor_right(columns \\ 1)</a> </div> <div class="summary-synopsis"><p>Sends cursor <code class="inline">columns</code> to the right</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#cursor_up/1">cursor_up(lines \\ 1)</a> </div> <div class="summary-synopsis"><p>Sends cursor <code class="inline">lines</code> up</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#cyan/0">cyan()</a> </div> <div class="summary-synopsis"><p>Sets foreground color to cyan</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#cyan_background/0">cyan_background()</a> </div> <div class="summary-synopsis"><p>Sets background color to cyan</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#default_background/0">default_background()</a> </div> <div class="summary-synopsis"><p>Default background color</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#default_color/0">default_color()</a> </div> <div class="summary-synopsis"><p>Default text color</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#enabled?/0">enabled?()</a> </div> <div class="summary-synopsis"><p>Checks if ANSI coloring is supported and enabled on this machine</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#encircled/0">encircled()</a> </div> <div class="summary-synopsis"><p>Encircled</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#faint/0">faint()</a> </div> <div class="summary-synopsis"><p>Faint (decreased intensity). Not widely supported</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#font_1/0">font_1()</a> </div> <div class="summary-synopsis"><p>Sets alternative font 1</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#font_2/0">font_2()</a> </div> <div class="summary-synopsis"><p>Sets alternative font 2</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#font_3/0">font_3()</a> </div> <div class="summary-synopsis"><p>Sets alternative font 3</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#font_4/0">font_4()</a> </div> <div class="summary-synopsis"><p>Sets alternative font 4</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#font_5/0">font_5()</a> </div> <div class="summary-synopsis"><p>Sets alternative font 5</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#font_6/0">font_6()</a> </div> <div class="summary-synopsis"><p>Sets alternative font 6</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#font_7/0">font_7()</a> </div> <div class="summary-synopsis"><p>Sets alternative font 7</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#font_8/0">font_8()</a> </div> <div class="summary-synopsis"><p>Sets alternative font 8</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#font_9/0">font_9()</a> </div> <div class="summary-synopsis"><p>Sets alternative font 9</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#format/2">format(chardata, emit? \\ enabled?())</a> </div> <div class="summary-synopsis"><p>Formats a chardata-like argument by converting named ANSI sequences into actual ANSI codes</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#format_fragment/2">format_fragment(chardata, emit? \\ enabled?())</a> </div> <div class="summary-synopsis"><p>Formats a chardata-like argument by converting named ANSI sequences into actual ANSI codes</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#framed/0">framed()</a> </div> <div class="summary-synopsis"><p>Framed</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#green/0">green()</a> </div> <div class="summary-synopsis"><p>Sets foreground color to green</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#green_background/0">green_background()</a> </div> <div class="summary-synopsis"><p>Sets background color to green</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#home/0">home()</a> </div> <div class="summary-synopsis"><p>Sends cursor home</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#inverse/0">inverse()</a> </div> <div class="summary-synopsis"><p>Image: negative. Swap foreground and background</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#inverse_off/0">inverse_off()</a> </div> <div class="summary-synopsis"><p>Image: positive. Normal foreground and background</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#italic/0">italic()</a> </div> <div class="summary-synopsis"><p>Italic: on. Not widely supported. Sometimes treated as inverse</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#light_black/0">light_black()</a> </div> <div class="summary-synopsis"><p>Sets foreground color to light black</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#light_black_background/0">light_black_background()</a> </div> <div class="summary-synopsis"><p>Sets background color to light black</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#light_blue/0">light_blue()</a> </div> <div class="summary-synopsis"><p>Sets foreground color to light blue</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#light_blue_background/0">light_blue_background()</a> </div> <div class="summary-synopsis"><p>Sets background color to light blue</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#light_cyan/0">light_cyan()</a> </div> <div class="summary-synopsis"><p>Sets foreground color to light cyan</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#light_cyan_background/0">light_cyan_background()</a> </div> <div class="summary-synopsis"><p>Sets background color to light cyan</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#light_green/0">light_green()</a> </div> <div class="summary-synopsis"><p>Sets foreground color to light green</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#light_green_background/0">light_green_background()</a> </div> <div class="summary-synopsis"><p>Sets background color to light green</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#light_magenta/0">light_magenta()</a> </div> <div class="summary-synopsis"><p>Sets foreground color to light magenta</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#light_magenta_background/0">light_magenta_background()</a> </div> <div class="summary-synopsis"><p>Sets background color to light magenta</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#light_red/0">light_red()</a> </div> <div class="summary-synopsis"><p>Sets foreground color to light red</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#light_red_background/0">light_red_background()</a> </div> <div class="summary-synopsis"><p>Sets background color to light red</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#light_white/0">light_white()</a> </div> <div class="summary-synopsis"><p>Sets foreground color to light white</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#light_white_background/0">light_white_background()</a> </div> <div class="summary-synopsis"><p>Sets background color to light white</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#light_yellow/0">light_yellow()</a> </div> <div class="summary-synopsis"><p>Sets foreground color to light yellow</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#light_yellow_background/0">light_yellow_background()</a> </div> <div class="summary-synopsis"><p>Sets background color to light yellow</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#magenta/0">magenta()</a> </div> <div class="summary-synopsis"><p>Sets foreground color to magenta</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#magenta_background/0">magenta_background()</a> </div> <div class="summary-synopsis"><p>Sets background color to magenta</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#no_underline/0">no_underline()</a> </div> <div class="summary-synopsis"><p>Underline: none</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#normal/0">normal()</a> </div> <div class="summary-synopsis"><p>Normal color or intensity</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#not_framed_encircled/0">not_framed_encircled()</a> </div> <div class="summary-synopsis"><p>Not framed or encircled</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#not_italic/0">not_italic()</a> </div> <div class="summary-synopsis"><p>Not italic</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#not_overlined/0">not_overlined()</a> </div> <div class="summary-synopsis"><p>Not overlined</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#overlined/0">overlined()</a> </div> <div class="summary-synopsis"><p>Overlined</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#primary_font/0">primary_font()</a> </div> <div class="summary-synopsis"><p>Sets primary (default) font</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#red/0">red()</a> </div> <div class="summary-synopsis"><p>Sets foreground color to red</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#red_background/0">red_background()</a> </div> <div class="summary-synopsis"><p>Sets background color to red</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#reset/0">reset()</a> </div> <div class="summary-synopsis"><p>Resets all attributes</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#reverse/0">reverse()</a> </div> <div class="summary-synopsis"><p>Image: negative. Swap foreground and background</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#reverse_off/0">reverse_off()</a> </div> <div class="summary-synopsis"><p>Image: positive. Normal foreground and background</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#underline/0">underline()</a> </div> <div class="summary-synopsis"><p>Underline: single</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#white/0">white()</a> </div> <div class="summary-synopsis"><p>Sets foreground color to white</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#white_background/0">white_background()</a> </div> <div class="summary-synopsis"><p>Sets background color to white</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#yellow/0">yellow()</a> </div> <div class="summary-synopsis"><p>Sets foreground color to yellow</p> </div> </div> <div class="summary-row"> <div class="summary-signature"> <a href="#yellow_background/0">yellow_background()</a> </div> <div class="summary-synopsis"><p>Sets background color to yellow</p> </div> </div> </div> </section> <section id="types" class="details-list"> <h1 class="section-heading"> <a class="hover-link" href="#types"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this section</span> </a> Types </h1> <div class="types-list"> <div class="detail" id="t:ansicode/0"> <div class="detail-header"> <a href="#t:ansicode/0" class="detail-link" title="Link to this type"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this type</span> </a> <span class="signature">ansicode()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L28" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> <div class="specs"> <pre>ansicode() :: <a href="typespecs.html#basic-types">atom</a>()</pre> </div> </div> <section class="docstring"> </section> </div> <div class="detail" id="t:ansidata/0"> <div class="detail-header"> <a href="#t:ansidata/0" class="detail-link" title="Link to this type"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this type</span> </a> <span class="signature">ansidata()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L31" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> <div class="specs"> <pre>ansidata() :: <a href="#t:ansilist/0">ansilist</a>() | <a href="#t:ansicode/0">ansicode</a>() | <a href="typespecs.html#built-in-types">binary</a>()</pre> </div> </div> <section class="docstring"> </section> </div> <div class="detail" id="t:ansilist/0"> <div class="detail-header"> <a href="#t:ansilist/0" class="detail-link" title="Link to this type"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this type</span> </a> <span class="signature">ansilist()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L29" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> <div class="specs"> <pre>ansilist() :: <a href="typespecs.html#basic-types">maybe_improper_list</a>( <a href="typespecs.html#built-in-types">char</a>() | <a href="#t:ansicode/0">ansicode</a>() | <a href="typespecs.html#built-in-types">binary</a>() | <a href="#t:ansilist/0">ansilist</a>(), <a href="typespecs.html#built-in-types">binary</a>() | <a href="#t:ansicode/0">ansicode</a>() | [] )</pre> </div> </div> <section class="docstring"> </section> </div> </div> </section> <section id="functions" class="details-list"> <h1 class="section-heading"> <a class="hover-link" href="#functions"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this section</span> </a> Functions </h1> <div class="detail" id="black/0"> <div class="detail-header"> <a href="#black/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">black()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L137" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets foreground color to black.</p> </section> </div> <div class="detail" id="black_background/0"> <div class="detail-header"> <a href="#black_background/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">black_background()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L143" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets background color to black.</p> </section> </div> <div class="detail" id="blink_off/0"> <div class="detail-header"> <a href="#blink_off/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">blink_off()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L125" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Blink: off.</p> </section> </div> <div class="detail" id="blink_rapid/0"> <div class="detail-header"> <a href="#blink_rapid/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">blink_rapid()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L93" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Blink: rapid. MS-DOS ANSI.SYS; 150 per minute or more; not widely supported.</p> </section> </div> <div class="detail" id="blink_slow/0"> <div class="detail-header"> <a href="#blink_slow/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">blink_slow()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L90" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Blink: slow. Less than 150 per minute.</p> </section> </div> <div class="detail" id="blue/0"> <div class="detail-header"> <a href="#blue/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">blue()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L137" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets foreground color to blue.</p> </section> </div> <div class="detail" id="blue_background/0"> <div class="detail-header"> <a href="#blue_background/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">blue_background()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L143" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets background color to blue.</p> </section> </div> <div class="detail" id="bright/0"> <div class="detail-header"> <a href="#bright/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">bright()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L78" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Bright (increased intensity) or bold.</p> </section> </div> <div class="detail" id="clear/0"> <div class="detail-header"> <a href="#clear/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">clear()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L201" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Clears screen.</p> </section> </div> <div class="detail" id="clear_line/0"> <div class="detail-header"> <a href="#clear_line/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">clear_line()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L204" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Clears line.</p> </section> </div> <div class="detail" id="color/1"> <div class="detail-header"> <a href="#color/1" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">color(code)</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L48" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> <div class="specs"> <pre>color(0..255) :: <a href="String.html#t:t/0">String.t</a>()</pre> </div> </div> <section class="docstring"> <p>Sets foreground color.</p> </section> </div> <div class="detail" id="color/3"> <div class="detail-header"> <a href="#color/3" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">color(r, g, b)</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L56" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> <div class="specs"> <pre>color(0..5, 0..5, 0..5) :: <a href="String.html#t:t/0">String.t</a>()</pre> </div> </div> <section class="docstring"> <p>Sets the foreground color from individual RGB values.</p> <p>Valid values for each color are in the range 0 to 5.</p> </section> </div> <div class="detail" id="color_background/1"> <div class="detail-header"> <a href="#color_background/1" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">color_background(code)</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L62" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> <div class="specs"> <pre>color_background(0..255) :: <a href="String.html#t:t/0">String.t</a>()</pre> </div> </div> <section class="docstring"> <p>Sets background color.</p> </section> </div> <div class="detail" id="color_background/3"> <div class="detail-header"> <a href="#color_background/3" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">color_background(r, g, b)</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L70" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> <div class="specs"> <pre>color_background(0..5, 0..5, 0..5) :: <a href="String.html#t:t/0">String.t</a>()</pre> </div> </div> <section class="docstring"> <p>Sets the background color from individual RGB values.</p> <p>Valid values for each color are in the range 0 to 5.</p> </section> </div> <div class="detail" id="conceal/0"> <div class="detail-header"> <a href="#conceal/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">conceal()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L102" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Conceal. Not widely supported.</p> </section> </div> <div class="detail" id="crossed_out/0"> <div class="detail-header"> <a href="#crossed_out/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">crossed_out()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L105" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Crossed-out. Characters legible, but marked for deletion. Not widely supported.</p> </section> </div> <div class="detail" id="cursor/2"> <div class="detail-header"> <a href="#cursor/2" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">cursor(line, column)</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L179" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> <div class="specs"> <pre>cursor(<a href="typespecs.html#basic-types">non_neg_integer</a>(), <a href="typespecs.html#basic-types">non_neg_integer</a>()) :: <a href="String.html#t:t/0">String.t</a>()</pre> </div> </div> <section class="docstring"> <p>Sends cursor to the absolute position specified by <code class="inline">line</code> and <code class="inline">column</code>.</p> <p>Line <code class="inline">0</code> and column <code class="inline">0</code> would mean the top left corner.</p> </section> </div> <div class="detail" id="cursor_down/1"> <span id="cursor_down/0"></span> <div class="detail-header"> <a href="#cursor_down/1" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">cursor_down(lines \\ 1)</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L190" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> <div class="specs"> <pre>cursor_down(<a href="typespecs.html#basic-types">pos_integer</a>()) :: <a href="String.html#t:t/0">String.t</a>()</pre> </div> </div> <section class="docstring"> <p>Sends cursor <code class="inline">lines</code> down.</p> </section> </div> <div class="detail" id="cursor_left/1"> <span id="cursor_left/0"></span> <div class="detail-header"> <a href="#cursor_left/1" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">cursor_left(columns \\ 1)</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L198" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> <div class="specs"> <pre>cursor_left(<a href="typespecs.html#basic-types">pos_integer</a>()) :: <a href="String.html#t:t/0">String.t</a>()</pre> </div> </div> <section class="docstring"> <p>Sends cursor <code class="inline">columns</code> to the left.</p> </section> </div> <div class="detail" id="cursor_right/1"> <span id="cursor_right/0"></span> <div class="detail-header"> <a href="#cursor_right/1" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">cursor_right(columns \\ 1)</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L194" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> <div class="specs"> <pre>cursor_right(<a href="typespecs.html#basic-types">pos_integer</a>()) :: <a href="String.html#t:t/0">String.t</a>()</pre> </div> </div> <section class="docstring"> <p>Sends cursor <code class="inline">columns</code> to the right.</p> </section> </div> <div class="detail" id="cursor_up/1"> <span id="cursor_up/0"></span> <div class="detail-header"> <a href="#cursor_up/1" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">cursor_up(lines \\ 1)</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L186" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> <div class="specs"> <pre>cursor_up(<a href="typespecs.html#basic-types">pos_integer</a>()) :: <a href="String.html#t:t/0">String.t</a>()</pre> </div> </div> <section class="docstring"> <p>Sends cursor <code class="inline">lines</code> up.</p> </section> </div> <div class="detail" id="cyan/0"> <div class="detail-header"> <a href="#cyan/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">cyan()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L137" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets foreground color to cyan.</p> </section> </div> <div class="detail" id="cyan_background/0"> <div class="detail-header"> <a href="#cyan_background/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">cyan_background()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L143" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets background color to cyan.</p> </section> </div> <div class="detail" id="default_background/0"> <div class="detail-header"> <a href="#default_background/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">default_background()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L153" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Default background color.</p> </section> </div> <div class="detail" id="default_color/0"> <div class="detail-header"> <a href="#default_color/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">default_color()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L150" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Default text color.</p> </section> </div> <div class="detail" id="enabled?/0"> <div class="detail-header"> <a href="#enabled?/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">enabled?()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L42" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> <div class="specs"> <pre>enabled?() :: <a href="typespecs.html#built-in-types">boolean</a>()</pre> </div> </div> <section class="docstring"> <p>Checks if ANSI coloring is supported and enabled on this machine.</p> <p>This function simply reads the configuration value for <code class="inline">:ansi_enabled</code> in the <code class="inline">:elixir</code> application. The value is by default <code class="inline">false</code> unless Elixir can detect during startup that both <code class="inline">stdout</code> and <code class="inline">stderr</code> are terminals.</p> </section> </div> <div class="detail" id="encircled/0"> <div class="detail-header"> <a href="#encircled/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">encircled()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L159" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Encircled.</p> </section> </div> <div class="detail" id="faint/0"> <div class="detail-header"> <a href="#faint/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">faint()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L81" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Faint (decreased intensity). Not widely supported.</p> </section> </div> <div class="detail" id="font_1/0"> <div class="detail-header"> <a href="#font_1/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">font_1()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L112" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets alternative font 1.</p> </section> </div> <div class="detail" id="font_2/0"> <div class="detail-header"> <a href="#font_2/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">font_2()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L112" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets alternative font 2.</p> </section> </div> <div class="detail" id="font_3/0"> <div class="detail-header"> <a href="#font_3/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">font_3()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L112" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets alternative font 3.</p> </section> </div> <div class="detail" id="font_4/0"> <div class="detail-header"> <a href="#font_4/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">font_4()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L112" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets alternative font 4.</p> </section> </div> <div class="detail" id="font_5/0"> <div class="detail-header"> <a href="#font_5/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">font_5()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L112" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets alternative font 5.</p> </section> </div> <div class="detail" id="font_6/0"> <div class="detail-header"> <a href="#font_6/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">font_6()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L112" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets alternative font 6.</p> </section> </div> <div class="detail" id="font_7/0"> <div class="detail-header"> <a href="#font_7/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">font_7()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L112" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets alternative font 7.</p> </section> </div> <div class="detail" id="font_8/0"> <div class="detail-header"> <a href="#font_8/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">font_8()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L112" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets alternative font 8.</p> </section> </div> <div class="detail" id="font_9/0"> <div class="detail-header"> <a href="#font_9/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">font_9()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L112" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets alternative font 9.</p> </section> </div> <div class="detail" id="format/2"> <span id="format/1"></span> <div class="detail-header"> <a href="#format/2" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">format(chardata, emit? \\ enabled?())</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L229" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Formats a chardata-like argument by converting named ANSI sequences into actual ANSI codes.</p> <p>The named sequences are represented by atoms.</p> <p>It will also append an <a href="IO.ANSI.html#reset/0"><code class="inline">IO.ANSI.reset/0</code></a> to the chardata when a conversion is performed. If you don’t want this behaviour, use <a href="#format_fragment/2"><code class="inline">format_fragment/2</code></a>.</p> <p>An optional boolean parameter can be passed to enable or disable emitting actual ANSI codes. When <code class="inline">false</code>, no ANSI codes will emitted. By default checks if ANSI is enabled using the <a href="#enabled?/0"><code class="inline">enabled?/0</code></a> function.</p> <h2 id="format/2-examples" class="section-heading"> <a href="#format/2-examples" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a> Examples </h2> <pre><code class="nohighlight makeup elixir"><span class="gp unselectable">iex> </span><span class="nc">IO.ANSI</span><span class="o">.</span><span class="n">format</span><span class="p" data-group-id="2025571712-1">(</span><span class="p" data-group-id="2025571712-2">[</span><span class="s">"Hello, "</span><span class="p">,</span><span class="w"> </span><span class="ss">:red</span><span class="p">,</span><span class="w"> </span><span class="ss">:bright</span><span class="p">,</span><span class="w"> </span><span class="s">"world!"</span><span class="p" data-group-id="2025571712-2">]</span><span class="p">,</span><span class="w"> </span><span class="no">true</span><span class="p" data-group-id="2025571712-1">)</span><span class="w"> </span><span class="p" data-group-id="2025571712-3">[</span><span class="p" data-group-id="2025571712-4">[</span><span class="p" data-group-id="2025571712-5">[</span><span class="p" data-group-id="2025571712-6">[</span><span class="p" data-group-id="2025571712-7">[</span><span class="p" data-group-id="2025571712-8">[</span><span class="p" data-group-id="2025571712-8">]</span><span class="p">,</span><span class="w"> </span><span class="s">"Hello, "</span><span class="p" data-group-id="2025571712-7">]</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="s">"</span><span class="se">\e</span><span class="s">[31m"</span><span class="p" data-group-id="2025571712-6">]</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="s">"</span><span class="se">\e</span><span class="s">[1m"</span><span class="p" data-group-id="2025571712-5">]</span><span class="p">,</span><span class="w"> </span><span class="s">"world!"</span><span class="p" data-group-id="2025571712-4">]</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="s">"</span><span class="se">\e</span><span class="s">[0m"</span><span class="p" data-group-id="2025571712-3">]</span></code></pre> </section> </div> <div class="detail" id="format_fragment/2"> <span id="format_fragment/1"></span> <div class="detail-header"> <a href="#format_fragment/2" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">format_fragment(chardata, emit? \\ enabled?())</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L249" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Formats a chardata-like argument by converting named ANSI sequences into actual ANSI codes.</p> <p>The named sequences are represented by atoms.</p> <p>An optional boolean parameter can be passed to enable or disable emitting actual ANSI codes. When <code class="inline">false</code>, no ANSI codes will emitted. By default checks if ANSI is enabled using the <a href="#enabled?/0"><code class="inline">enabled?/0</code></a> function.</p> <h2 id="format_fragment/2-examples" class="section-heading"> <a href="#format_fragment/2-examples" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a> Examples </h2> <pre><code class="nohighlight makeup elixir"><span class="gp unselectable">iex> </span><span class="nc">IO.ANSI</span><span class="o">.</span><span class="n">format_fragment</span><span class="p" data-group-id="4235564252-1">(</span><span class="p" data-group-id="4235564252-2">[</span><span class="ss">:bright</span><span class="p">,</span><span class="w"> </span><span class="sc">'Word'</span><span class="p" data-group-id="4235564252-2">]</span><span class="p">,</span><span class="w"> </span><span class="no">true</span><span class="p" data-group-id="4235564252-1">)</span><span class="w"> </span><span class="p" data-group-id="4235564252-3">[</span><span class="p" data-group-id="4235564252-4">[</span><span class="p" data-group-id="4235564252-5">[</span><span class="p" data-group-id="4235564252-6">[</span><span class="p" data-group-id="4235564252-7">[</span><span class="p" data-group-id="4235564252-8">[</span><span class="p" data-group-id="4235564252-8">]</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="s">"</span><span class="se">\e</span><span class="s">[1m"</span><span class="p" data-group-id="4235564252-7">]</span><span class="p">,</span><span class="w"> </span><span class="mi">87</span><span class="p" data-group-id="4235564252-6">]</span><span class="p">,</span><span class="w"> </span><span class="mi">111</span><span class="p" data-group-id="4235564252-5">]</span><span class="p">,</span><span class="w"> </span><span class="mi">114</span><span class="p" data-group-id="4235564252-4">]</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p" data-group-id="4235564252-3">]</span></code></pre> </section> </div> <div class="detail" id="framed/0"> <div class="detail-header"> <a href="#framed/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">framed()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L156" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Framed.</p> </section> </div> <div class="detail" id="green/0"> <div class="detail-header"> <a href="#green/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">green()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L137" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets foreground color to green.</p> </section> </div> <div class="detail" id="green_background/0"> <div class="detail-header"> <a href="#green_background/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">green_background()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L143" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets background color to green.</p> </section> </div> <div class="detail" id="home/0"> <div class="detail-header"> <a href="#home/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">home()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L171" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sends cursor home.</p> </section> </div> <div class="detail" id="inverse/0"> <div class="detail-header"> <a href="#inverse/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">inverse()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L96" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Image: negative. Swap foreground and background.</p> </section> </div> <div class="detail" id="inverse_off/0"> <div class="detail-header"> <a href="#inverse_off/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">inverse_off()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L128" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Image: positive. Normal foreground and background.</p> </section> </div> <div class="detail" id="italic/0"> <div class="detail-header"> <a href="#italic/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">italic()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L84" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Italic: on. Not widely supported. Sometimes treated as inverse.</p> </section> </div> <div class="detail" id="light_black/0"> <div class="detail-header"> <a href="#light_black/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">light_black()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L140" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets foreground color to light black.</p> </section> </div> <div class="detail" id="light_black_background/0"> <div class="detail-header"> <a href="#light_black_background/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">light_black_background()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L146" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets background color to light black.</p> </section> </div> <div class="detail" id="light_blue/0"> <div class="detail-header"> <a href="#light_blue/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">light_blue()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L140" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets foreground color to light blue.</p> </section> </div> <div class="detail" id="light_blue_background/0"> <div class="detail-header"> <a href="#light_blue_background/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">light_blue_background()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L146" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets background color to light blue.</p> </section> </div> <div class="detail" id="light_cyan/0"> <div class="detail-header"> <a href="#light_cyan/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">light_cyan()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L140" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets foreground color to light cyan.</p> </section> </div> <div class="detail" id="light_cyan_background/0"> <div class="detail-header"> <a href="#light_cyan_background/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">light_cyan_background()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L146" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets background color to light cyan.</p> </section> </div> <div class="detail" id="light_green/0"> <div class="detail-header"> <a href="#light_green/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">light_green()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L140" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets foreground color to light green.</p> </section> </div> <div class="detail" id="light_green_background/0"> <div class="detail-header"> <a href="#light_green_background/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">light_green_background()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L146" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets background color to light green.</p> </section> </div> <div class="detail" id="light_magenta/0"> <div class="detail-header"> <a href="#light_magenta/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">light_magenta()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L140" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets foreground color to light magenta.</p> </section> </div> <div class="detail" id="light_magenta_background/0"> <div class="detail-header"> <a href="#light_magenta_background/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">light_magenta_background()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L146" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets background color to light magenta.</p> </section> </div> <div class="detail" id="light_red/0"> <div class="detail-header"> <a href="#light_red/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">light_red()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L140" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets foreground color to light red.</p> </section> </div> <div class="detail" id="light_red_background/0"> <div class="detail-header"> <a href="#light_red_background/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">light_red_background()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L146" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets background color to light red.</p> </section> </div> <div class="detail" id="light_white/0"> <div class="detail-header"> <a href="#light_white/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">light_white()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L140" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets foreground color to light white.</p> </section> </div> <div class="detail" id="light_white_background/0"> <div class="detail-header"> <a href="#light_white_background/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">light_white_background()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L146" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets background color to light white.</p> </section> </div> <div class="detail" id="light_yellow/0"> <div class="detail-header"> <a href="#light_yellow/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">light_yellow()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L140" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets foreground color to light yellow.</p> </section> </div> <div class="detail" id="light_yellow_background/0"> <div class="detail-header"> <a href="#light_yellow_background/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">light_yellow_background()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L146" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets background color to light yellow.</p> </section> </div> <div class="detail" id="magenta/0"> <div class="detail-header"> <a href="#magenta/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">magenta()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L137" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets foreground color to magenta.</p> </section> </div> <div class="detail" id="magenta_background/0"> <div class="detail-header"> <a href="#magenta_background/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">magenta_background()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L143" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets background color to magenta.</p> </section> </div> <div class="detail" id="no_underline/0"> <div class="detail-header"> <a href="#no_underline/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">no_underline()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L122" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Underline: none.</p> </section> </div> <div class="detail" id="normal/0"> <div class="detail-header"> <a href="#normal/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">normal()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L116" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Normal color or intensity.</p> </section> </div> <div class="detail" id="not_framed_encircled/0"> <div class="detail-header"> <a href="#not_framed_encircled/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">not_framed_encircled()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L165" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Not framed or encircled.</p> </section> </div> <div class="detail" id="not_italic/0"> <div class="detail-header"> <a href="#not_italic/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">not_italic()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L119" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Not italic.</p> </section> </div> <div class="detail" id="not_overlined/0"> <div class="detail-header"> <a href="#not_overlined/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">not_overlined()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L168" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Not overlined.</p> </section> </div> <div class="detail" id="overlined/0"> <div class="detail-header"> <a href="#overlined/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">overlined()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L162" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Overlined.</p> </section> </div> <div class="detail" id="primary_font/0"> <div class="detail-header"> <a href="#primary_font/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">primary_font()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L108" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets primary (default) font.</p> </section> </div> <div class="detail" id="red/0"> <div class="detail-header"> <a href="#red/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">red()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L137" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets foreground color to red.</p> </section> </div> <div class="detail" id="red_background/0"> <div class="detail-header"> <a href="#red_background/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">red_background()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L143" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets background color to red.</p> </section> </div> <div class="detail" id="reset/0"> <div class="detail-header"> <a href="#reset/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">reset()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L75" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Resets all attributes.</p> </section> </div> <div class="detail" id="reverse/0"> <div class="detail-header"> <a href="#reverse/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">reverse()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L99" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Image: negative. Swap foreground and background.</p> </section> </div> <div class="detail" id="reverse_off/0"> <div class="detail-header"> <a href="#reverse_off/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">reverse_off()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L131" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Image: positive. Normal foreground and background.</p> </section> </div> <div class="detail" id="underline/0"> <div class="detail-header"> <a href="#underline/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">underline()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L87" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Underline: single.</p> </section> </div> <div class="detail" id="white/0"> <div class="detail-header"> <a href="#white/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">white()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L137" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets foreground color to white.</p> </section> </div> <div class="detail" id="white_background/0"> <div class="detail-header"> <a href="#white_background/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">white_background()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L143" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets background color to white.</p> </section> </div> <div class="detail" id="yellow/0"> <div class="detail-header"> <a href="#yellow/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">yellow()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L137" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets foreground color to yellow.</p> </section> </div> <div class="detail" id="yellow_background/0"> <div class="detail-header"> <a href="#yellow_background/0" class="detail-link" title="Link to this function"> <span class="icon-link" aria-hidden="true"></span> <span class="sr-only">Link to this function</span> </a> <span class="signature">yellow_background()</span> <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/io/ansi.ex#L143" class="view-source" rel="help" title="View Source"> <span class="icon-code" aria-hidden="true"></span> <span class="sr-only">View Source</span> </a> </div> <section class="docstring"> <p>Sets background color to yellow.</p> </section> </div> </section> <footer class="footer"> <p> <span class="line"> Built using <a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" target="_blank" rel="help noopener">ExDoc</a> (v0.19.1), </span> <span class="line"> designed by <a href="https://twitter.com/dignifiedquire" target="_blank" rel="noopener" title="@dignifiedquire">Friedel Ziegelmayer</a>. </span> </p> </footer> </div> </div> </section> </div> <script src="dist/app-a0c90688fa.js"></script> </body> </html>