Share your repls and programming experiences

← Back to all posts
Ansi Escape Color Codes
h
Raniconduh (17)

Ansi Escape Color Codes

This website provides a list of color codes to be used in text based, console, or TUI apps. Currently the supported languages are

  • Java
  • Python
  • C
  • Lua

It isn't hard to add new languages so either tell me or port them yourself :)

Usage

For your convenience, raw pages have been added to allow you to easily copy paste or curl the variables. Something like

curl https://ansi-escapes.raniconduh.repl.co/raw/$language

where $language is one of the supported languages (refer to the above list).

Ok but actual usage

Really simple: copy paste the variables for the language you want into your project and color away! Examples for how to use the variables are provided in the site itself.

Why'd I make this?

Ansi escapes are great for when you don't want to work with (n)curses. They're easy to use and very convenient. Also, I noticed that lots of other people would import unnecessary modules etc. just to color the text. Now, you don't have to!