Colors in shell

  1. #!/usr/bin/env bash
  2. # COLORS
  3. red=$(tput setaf 1)
  4. green=$(tput setaf 2)
  5. yellow=$(tput setaf 3)
  6. blue=$(tput setaf 4)
  7. purple=$(tput setaf 5)
  8. cyan=$(tput setaf 6)
  9. white=$(tput setaf 7)
  10. reset=$(tput sgr0)
  11. # SUCCESS OUTPUT
  12. success() {
  13. cat <<"EOT"
  14. _ _
  15. | | | |
  16. ___ _ _ _ __ ___ ___ ___ _ __ ___ _ __ | | ___| |_ ___
  17. / __| | | | '_ \ / __| / __/ _ \| '_ ` _ \| '_ \| |/ _ \ __/ _ \
  18. \__ \ |_| | | | | (__ | (__ (_) | | | | | | |_) | | __/ |_ __/
  19. |___/\__, |_| |_|\___| \___\___/|_| |_| |_| .__/|_|\___|\__\___|
  20. __/ | | |
  21. |___/ |_|
  22. EOT
  23. }