Advertisement
Zoltar358

Bash Colors

Feb 7th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.57 KB | None | 0 0
  1. #!/bin/bash
  2. # Last update: 2018-10-14
  3.  
  4.  
  5. # Colors
  6. # ------
  7. # Usage: <Red, Green, Yellow, Blue, Magenta, Cyan, Orange> "Sample text"
  8.  
  9. Default() { echo -e "\e[38;5;7m$1" ; }
  10. Red() { echo -e "\e[38;5;9m$1\e[38;5;7m" ; }
  11. Green() { echo -e "\e[38;5;28m$1\e[38;5;7m" ; }
  12. Yellow() { echo -e "\e[38;5;220m$1\e[38;5;7m" ; }
  13. Blue() { echo -e "\e[38;5;20m$1\e[38;5;7m" ; }
  14. Magenta() { echo -e "\e[38;5;126m$1\e[38;5;7m" ; }
  15. Cyan() { echo -e "\e[38;5;39m$1\e[38;5;7m" ; }
  16. Orange() { echo -e "\e[38;5;202m$1\e[38;5;7m" ; }
  17. OneEmptyLine() { echo ; }
  18. TwoEmptyLines() { echo ; echo ; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement