Printf Color Output - Discover Gists · GitHub

Skip to content Search Gists Search Gists All gists Back to GitHub Sign in Sign up Sign in Sign up Dismiss alert {{ message }}

Instantly share code, notes, and snippets.

@WestleyK WestleyK/output-color.sh Created August 15, 2018 01:19 Show Gist options
  • Star (33) You must be signed in to star a gist
  • Fork (4) You must be signed in to fork a gist
  • Embed Select an option
    • Embed Embed this gist in your website.
    • Share Copy sharable link for this gist.
    • Clone via HTTPS Clone using the web URL.

    No results found

    Learn more about clone URLs Clone this repository at <script src="https://gist.github.com/WestleyK/dc71766b3ce28bb31be54b9ab7709082.js"></script>
  • Save WestleyK/dc71766b3ce28bb31be54b9ab7709082 to your computer and use it in GitHub Desktop.
Code Revisions 1 Stars 33 Forks 4 Embed Select an option
  • Embed Embed this gist in your website.
  • Share Copy sharable link for this gist.
  • Clone via HTTPS Clone using the web URL.

No results found

Learn more about clone URLs Clone this repository at <script src="https://gist.github.com/WestleyK/dc71766b3ce28bb31be54b9ab7709082.js"></script> Save WestleyK/dc71766b3ce28bb31be54b9ab7709082 to your computer and use it in GitHub Desktop. Download ZIP printf color output Raw output-color.sh This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters
#!/bin/bash
#
# Created by: Westley K
# Date: Aug 14, 2018
#
# run this in your terminal, and
# you will get nice colors and effects!
#
printf "Colors:\n"
printf "\033[0;30mHello World! black\033[0m\n"
printf "\033[0;31mHello World! red\033[0m\n"
printf "\033[0;32mHello World! green\033[0m\n"
printf "\033[0;33mHello World! yellow\033[0m\n"
printf "\033[0;34mHello World! blue\033[0m\n"
printf "\033[0;35mHello World! pink\033[0m\n"
printf "\033[0;36mHello World! teal\033[0m\n"
printf "\033[0;37mHello World! white\033[0m\n"
printf "\nBold:\n"
printf "\033[30;1mHello World! grey\033[0m\n"
printf "\033[31;1mHello World! orange\033[0m\n"
printf "\033[32;1mHello World! green\033[0m\n"
printf "\033[33;1mHello World! yellow\033[0m\n"
printf "\033[34;1mHello World! blue\033[0m\n"
printf "\033[35;1mHello World! pink\033[0m\n"
printf "\033[36;1mHello World! teal\033[0m\n"
printf "\033[37;1mHello World! white\033[0m\n"
printf "\nEffects:\n\n"
printf "Black text effects:\n"
printf "\033[30;2mHello World!\033[0m\n"
printf "\033[30;3mHello World!\033[0m\n"
printf "\033[30;4mHello World!\033[0m\n"
printf "\033[30;5mHello World! blink\033[0m\n"
printf "\033[30;6mHello World!\033[0m\n"
printf "\033[30;7mHello World!\033[0m\n"
printf "\033[30;8mHello World!\033[0m\n"
printf "\nRed text effects:\n"
printf "\033[31;2mHello World! faint\033[0m\n"
printf "\033[31;3mHello World! normal\033[0m\n"
printf "\033[31;4mHello World! underline\033[0m\n"
printf "\033[31;5mHello World! blink\033[0m\n"
printf "\033[31;6mHello World! normal, I think\033[0m\n"
printf "\033[31;7mHello World! negative text\033[0m\n"
printf "\nGreen text effects:\n"
printf "\033[32;2mHello World! faint\033[0m\n"
printf "\033[32;3mHello World! normal\033[0m\n"
printf "\033[32;4mHello World! underline\033[0m\n"
printf "\033[32;5mHello World! blink\033[0m\n"
printf "\033[32;6mHello World! normal, I think\033[0m\n"
printf "\033[32;7mHello World! negative text\033[0m\n"
printf "\nYellow text effects:\n"
printf "\033[33;2mHello World! faint\033[0m\n"
printf "\033[33;3mHello World! normal\033[0m\n"
printf "\033[33;4mHello World! underline\033[0m\n"
printf "\033[33;5mHello World! blink\033[0m\n"
printf "\033[33;6mHello World! normal, I think\033[0m\n"
printf "\033[33;7mHello World! negative text\033[0m\n"
printf "\nBlue text effects:\n"
printf "\033[34;2mHello World! faint\033[0m\n"
printf "\033[34;3mHello World! normal\033[0m\n"
printf "\033[34;4mHello World! underline\033[0m\n"
printf "\033[34;5mHello World! blink\033[0m\n"
printf "\033[34;6mHello World! normal, I think\033[0m\n"
printf "\033[34;7mHello World! negative text\033[0m\n"
printf "\nPink text effects:\n"
printf "\033[35;2mHello World! faint\033[0m\n"
printf "\033[35;3mHello World! normal\033[0m\n"
printf "\033[35;4mHello World! underline\033[0m\n"
printf "\033[35;5mHello World! blink\033[0m\n"
printf "\033[35;6mHello World! normal, I think\033[0m\n"
printf "\033[35;7mHello World! negative text\033[0m\n"
printf "\nTeal text effects:\n"
printf "\033[36;2mHello World! faint\033[0m\n"
printf "\033[36;3mHello World! normal\033[0m\n"
printf "\033[36;4mHello World! underline\033[0m\n"
printf "\033[36;5mHello World! blink\033[0m\n"
printf "\033[36;6mHello World! normal, I think\033[0m\n"
printf "\033[36;7mHello World! negative text\033[0m\n"
printf "\nWhite text effects:\n"
printf "\033[37;2mHello World! faint\033[0m\n"
printf "\033[37;3mHello World! normal\033[0m\n"
printf "\033[37;4mHello World! underline\033[0m\n"
printf "\033[37;5mHello World! blink\033[0m\n"
printf "\033[37;6mHello World! normal, I think\033[0m\n"
printf "\033[37;7mHello World! negative text\033[0m\n"
printf "\n"
#
# End script
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment You can’t perform that action at this time.

Tag » Color Printf