Skip to content

Instantly share code, notes, and snippets.

@avcaliani
Last active July 17, 2021 22:29
Show Gist options
  • Save avcaliani/b322de0cb5fb77484c2492f125b0903b to your computer and use it in GitHub Desktop.
Save avcaliani/b322de0cb5fb77484c2492f125b0903b to your computer and use it in GitHub Desktop.
#code #bash #colors

🎨 Have a colourful terminal \o/

By Anthony Vilarim Caliani

# #

This is an example of how to make your terminal more colorful.
It may work in any code language that prints the content to a console.

Related Links

#!/bin/bash
# @script color.sh
# @author Anthony Vilarim Caliani
# @contact github.com/avcaliani
#
# @description
# An example about how to make your terminal more colorful.
#
# @usage
# ./color.sh
#
# $1: Color
color() {
printf "\033[$1m ooooo \033[00m"
}
printf "\n"
printf " $(color '0;30' ) Black \n"
printf " $(color '0;31' ) Red \n"
printf " $(color '0;32' ) Green \n"
printf " $(color '0;33' ) Yellow \n"
printf " $(color '0;34' ) Blue \n"
printf " $(color '0;35' ) Magenta \n"
printf " $(color '0;36' ) Cyan \n"
printf " $(color '0;37' ) White \n"
printf " $(color '38;5;202') Orange \n"
printf "\n"
printf " $(color '0;32') Normal Green \n"
printf " $(color '1;32') Bold Green \n"
printf " $(color '3;32') Italic Green \n"
printf " $(color '4;32') Underline Green \n"
printf " $(color '5;32') Blink Green \n"
printf "\n"
printf " $(color '0') Reset Colors \n"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment