Created
July 24, 2016 17:05
-
-
Save bmurithi/e1da0ba0c8b645591e255d102b7534ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-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