Colors and Formatting in Linux Terminal | Ubuntu | Heck Tech Lanka #06

Colors and Formatting in Linux Terminal | Ubuntu | Heck Tech Lanka #06

Text Formatting
Here are the most commonly supported control sequences for formatting text. Their support depends on the used terminal

Bold/Bright 
$ echo -e "Normal \e[1mBold"
Dim
$ echo -e "Normal \e[2mDim"
Underlined
$ echo -e "Normal \e[4mUnderlined"
Blink  
$ echo -e "Normal \e[5mBlink"
Reverse (Invert the foreground and background colors) 
$ echo -e "Normal \e[7minverted
Hidden (useful for passwords) 
$ echo -e "Normal \e[8mHidden"

Text Foreground
Default foreground color 
$ echo -e "Default \e[39mDefault"
Black 
$ echo -e "Default \e[30mBlack"
Red 
$ echo -e "Default \e[31mRed"
Green 
$ echo -e "Default \e[32mGreen"
Yellow 
$ echo -e "Default \e[33mYellow"
Blue 
$ echo -e "Default \e[34mBlue"
Magenta 
$ echo -e "Default \e[35mMagenta"
Cyan 
$ echo -e "Default \e[36mCyan"
Light gray 
$ echo -e "Default \e[37mLight gray"
Dark gray 
$ echo -e "Default \e[90mDark gray"
Light red 
$ echo -e "Default \e[91mLight red"
Light green 
$ echo -e "Default \e[92mLight green"
Light yellow 
$ echo -e "Default \e[93mLight yellow"
Light blue 
$ echo -e "Default \e[94mLight blue"
Light magenta 
$ echo -e "Default \e[95mLight magenta"
Light cyan 
$ echo -e "Default \e[96mLight cyan"
White 
$ echo -e "Default \e[97mWhite"

Text Background

Default background color 
$ echo -e "Default \e[49mDefault"
Black 
$ echo -e "Default \e[40mBlack"
Red 
$ echo -e "Default \e[41mRed"
Green 
$ echo -e "Default \e[42mGreen"
Yellow 
$ echo -e "Default \e[43mYellow"
Blue 
$ echo -e "Default \e[44mBlue"
Magenta 
$ echo -e "Default \e[45mMagenta"
Cyan 
$ echo -e "Default \e[46mCyan"
Light gray 
$ echo -e "Default \e[47mLight gray"
Dark gray 
$ echo -e "Default \e[100mDark gray"
Light red 
$ echo -e "Default \e[101mLight red"
Light green 
$ echo -e "Default \e[102mLight green"
Light yellow 
$ echo -e "Default \e[103mLight yellow"
Light blue 
$ echo -e "Default \e[104mLight blue"
Light magenta 
$ echo -e "Default \e[105mLight magenta"
Light cyan 
$ echo -e "Default \e[106mLight cyan"
White 
$echo -e "Default \e[107mWhite"

Code (Bash)


$ echo -e "\e[38;5;82mHello \e[38;5;198mWorld"
$ for i in {16..21} {21..16} ; do echo -en "\e[38;5;${i}m#\e[0m" ; done ; echo

Tamil

Sinhala

Colors and Formatting in Linux Terminal | Ubuntu | Heck Tech Lanka #06

Labels:


author-photo

Hello, I’m Ramzan Graphics Designer and WEB Developer from Mutur, Trincomalee Sri Lanka.I am owner of Ram Soft Tm. I hold a master degree BTEC HND in Computing
PayPal|Bank

Post a Comment

[blogger][disqus][facebook]

ivythemes

{picture#https://ramsofttm.com/wp-content/uploads/2019/01/Ramzan-Lanka-480x480.jpg} Hello, I’m Ramzan Graphics Designer and WEB Developer from Mutur, Trincomalee Sri Lanka.I am owner of Ram Soft Tm . I hold a master degree of Graphic Design and WEB Developer {facebook#https://www.facebook.com/ramzanlankaa} {twitter#https://www.facebook.com/ramzanlankaa} {google#https://www.facebook.com/ramzanlankaa} {pinterest#https://www.facebook.com/ramzanlankaa} {youtube#https://www.facebook.com/ramzanlankaa} {instagram#https://www.facebook.com/ramzanlankaa}

Contact Form

Name

Email *

Message *

Powered by Blogger.