Skip to content

Instantly share code, notes, and snippets.

@leommoore
Last active October 14, 2024 20:07
Show Gist options
  • Select an option

  • Save leommoore/4526808 to your computer and use it in GitHub Desktop.

Select an option

Save leommoore/4526808 to your computer and use it in GitHub Desktop.

Revisions

  1. leommoore revised this gist Nov 9, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion javascript_ANSI_escape_codes.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    #JavaScript - ANSI Escape Codes
    # JavaScript - ANSI Escape Codes

    ANSI Escape Codes are special characters which can be used to control formatting, colors or other output preferences in a text terminal. Escape Codes are non-printing code and will not appear in the output directly.

  2. leommoore revised this gist Jan 13, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion javascript_ANSI_escape_codes.md
    Original file line number Diff line number Diff line change
    @@ -15,4 +15,4 @@ console.log('\033[33m Hello World \033[39m');

    This will give a nice yellow color Hello World.

    The complete table of ANSI Escape Codes is available at http://en.wikipedia.org/wiki/ansi_escape_code
    The complete table of ANSI Escape Codes is available at http://en.wikipedia.org/wiki/ANSI_escape_code
  3. leommoore created this gist Jan 13, 2013.
    18 changes: 18 additions & 0 deletions javascript_ANSI_escape_codes.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    #JavaScript - ANSI Escape Codes

    ANSI Escape Codes are special characters which can be used to control formatting, colors or other output preferences in a text terminal. Escape Codes are non-printing code and will not appear in the output directly.

    - \033 begins the escape sequence
    - [ indicates the color
    - 33 is the foreground color for yellow
    - m indicates the end of the setting

    Note: \033[39m is used set the color back to the terminal defult

    ```JavaScript
    console.log('\033[33m Hello World \033[39m');
    ```

    This will give a nice yellow color Hello World.

    The complete table of ANSI Escape Codes is available at http://en.wikipedia.org/wiki/ansi_escape_code