3

so i wanted to make a MR ROBOT default banner, but i don't know how to make the output in a red Color in terminal, could somebody please help? also does anybody have the Original MR ROBOT ascii art? if so please drop it here.

ps: using kali linux 2018.1 release

sam
  • 41

2 Answers2

3

While tput is very handy for mobile environments, ASCII colouring is always an alternative:

echo -e "\x1B[31m MR ROBOT \x1B[0m"

will output the term MR ROBOT in red font.

\x1B[31m = RED
\x1B[32m = GREEN
\x1B[96m = Blue
\x1B[01;95m = PURPLE
\x1B[01;94m = VIOLET
\x1B[01;93m = Yellow
\x1B[01;91m = ORANGE
\x1B[01;90m = GREY
\x1B[01;89m = WHITE
\x1B[0m = Back to your terminal's default colour

Related: How to change the output color of echo in Linux on Stack Overflow

David Foerster
  • 36,264
  • 56
  • 94
  • 147
Jonathin
  • 56
  • 8
0

Try using this :

$ tput setaf 1; echo 'MR ROBOT'; tput sgr0

enter image description here

And as explained in comments, do not hard-code ANSI color escape sequences in your program! The tput command lets you interact with the terminal database in a sane way: http://mywiki.wooledge.org/BashFAQ/037

  • thank you. but instead of 'MR RROBOT' i have a custom big ascii artwork, you see i want to make it as a banner for my terminal. a default one if that's a correct word, i'm sorry i'm new to all of this – sam Mar 04 '18 at 19:06
  • you can replace the echo part with another command or cat file – Gilles Quénot Mar 04 '18 at 19:09