Advertisement
kbmonkey

tux ansi color script

Aug 13th, 2011
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.77 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # ANSI Color -- use these variables to easily have different color
  4. # and format output. Make sure to output the reset sequence after
  5. # colors (f = foreground, b = background), and use the 'off'
  6. # feature for anything you turn on.
  7.  
  8. initializeANSI()
  9. {
  10. esc=""
  11.  
  12. blackf="${esc}[30m"; redf="${esc}[31m"; greenf="${esc}[32m"
  13. yellowf="${esc}[33m" bluef="${esc}[34m"; purplef="${esc}[35m"
  14. cyanf="${esc}[36m"; whitef="${esc}[37m"
  15.  
  16. blackb="${esc}[40m"; redb="${esc}[41m"; greenb="${esc}[42m"
  17. yellowb="${esc}[43m" blueb="${esc}[44m"; purpleb="${esc}[45m"
  18. cyanb="${esc}[46m"; whiteb="${esc}[47m"
  19.  
  20. boldon="${esc}[1m"; boldoff="${esc}[22m"
  21. italicson="${esc}[3m"; italicsoff="${esc}[23m"
  22. ulon="${esc}[4m"; uloff="${esc}[24m"
  23. invon="${esc}[7m"; invoff="${esc}[27m"
  24.  
  25. reset="${esc}[0m"
  26. }
  27.  
  28. # note in this first use that switching colors doesn't require a reset
  29. # first - the new color overrides the old one.
  30.  
  31. initializeANSI
  32.  
  33. # ▄█████▄
  34. # █████████
  35. # ████████▀██
  36. # ██████████▄██
  37. # ██▀▀███▀▀████
  38. # ████ █ ██ ███
  39. # █ ████
  40. # █ ▄ ████
  41. # ███▀▀▀▀▀▄▀████
  42. # ██▀▀▀▀▀▀ ███▄
  43. # ▄█▀ █████
  44. # ███ ██████
  45. # ███ ██████
  46. # █▀██ ██████
  47. # █ █ █ ████
  48. # █ █ ██ ███
  49. # ██ ▀ █▀ ████
  50. # ███ ████
  51. # █████ ███ ███
  52. # █▀▀███ █████████
  53. # ▄█ ███ █▀ ████ ▀█
  54. # ▄█▀ ████ █ ▀ █
  55. # █ ████ █ █ ██
  56. # █ ██ █ █ ▀█
  57. # █ █ █ █ █
  58. # █ ███████████ ▄▀
  59. # █▄ █ ▀▀▀▀▀▀▀ █ ▄▀
  60. # ▀▀▀▀▀▄▄▄█▀ ▀▄ █
  61. # ▀▀▀▀
  62.  
  63. # play with these to change:
  64. tuxbg=${blackb} # color behind tux
  65. tuxfg=${bluef} # tux line color
  66.  
  67. # tip: auto update your drawings to see changes real-time
  68. # while true; do (sleep 3s && clear && sh script); done
  69.  
  70. cat << EOF
  71.  
  72. ${tuxfg}${tuxbg}
  73.  
  74. ▄█████▄
  75. █████████
  76. ${whiteb}████████▀██${tuxbg}
  77. ${whiteb}██████████▄██${tuxbg}
  78. ${whiteb}██▀▀███▀▀████${tuxbg}
  79. ${whiteb}████ █ ██ ███${tuxbg}
  80. ${yellowb}█ ████${tuxbg}
  81. ${yellowb}█ ▄ ████${tuxbg}
  82. ${yellowb}███▀▀▀▀▀▄${whiteb}▀████${tuxbg}
  83. ${whiteb}██▀▀▀▀▀▀ ███${tuxbg}▄
  84. ▄█${whiteb}▀ █████${tuxbg}
  85. ${whiteb}███ ██████${tuxbg}
  86. ${whiteb}███ ██████${tuxbg}
  87. ${whiteb}█▀██ ██████${tuxbg}
  88. ${whiteb}█ █ █ ████${tuxbg}
  89. ${whiteb}█ █ ██ ███${tuxbg}
  90. ${whiteb}██ ▀ █▀ ████${tuxbg}
  91. ${whiteb}███ ████${tuxbg}
  92. ${whiteb}█████ ███ ███${tuxbg}
  93. ${yellowb}█▀▀███${whiteb} █████████${tuxbg}
  94. ▄${yellowb}█ ███${whiteb} █${yellowb}▀ ████ ▀█${tuxbg}
  95. ▄█${yellowb}▀ ████${whiteb} █${yellowb} ▀ █${tuxbg}
  96. █${yellowb} ████${whiteb} █ █${yellowb} ██${tuxbg}
  97. █${yellowb} ██${whiteb} █ █${yellowb} ▀█${tuxbg}
  98. █${yellowb} █${whiteb} █ █${yellowb} █${tuxbg}
  99. █${yellowb} ███████████${yellowb} ▄${tuxbg}▀
  100. █${yellowb}▄ █${tuxbg} ▀▀▀▀▀▀▀ █${yellowb} ▄${tuxbg}▀
  101. ▀▀▀▀▀${yellowb}▄▄▄█${tuxbg}▀ ▀${yellowb}▄ █${tuxbg}
  102. ▀▀▀▀${tuxbg}
  103. ${reset}
  104. EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement