Skip to content

Instantly share code, notes, and snippets.

@bmurithi
Created July 24, 2016 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmurithi/e1da0ba0c8b645591e255d102b7534ad to your computer and use it in GitHub Desktop.
Save bmurithi/e1da0ba0c8b645591e255d102b7534ad to your computer and use it in GitHub Desktop.
-module(colored_text).
-export([red/0, red/1, text/2]).
red() ->
io:format("\e[41m\e[1m ======================= SOMETHING SOMETHING ======================\033[0mi~n", []).
red(Whatever) ->
io:format("\e[41m\e[1m~p\033[0m", [Whatever]).
text(ColorCode, Whatever) when is_integer(ColorCode) ->
io:format("\e[~wm\e[1m~p\033[0m", [ColorCode, Whatever]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment