Last active
May 23, 2024 03:57
-
-
Save hoggren/fb9a373a45c5ce675140c4db212cd715 to your computer and use it in GitHub Desktop.
Terminal / shell / bash color modifiers to colorize your output!
This file contains 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
#!/bin/bash | |
# Special characters that modifies the output with coloring. | |
# Characters after one of these will be in the specified color until another | |
# color or reset character is specified. | |
# Color character modifiers | |
BLACK="\033[30m" | |
RED="\033[31m" | |
GREEN="\033[32m" | |
YELLOW="\033[33m" | |
BLUE="\033[34m" | |
MAGENTA="\033[35m" | |
CYAN="\033[36m" | |
WHITE="\033[37m" | |
# Bold color character modifiers | |
BBLACK="\033[1m\033[30m" | |
BRED="\033[1m\033[31m" | |
BGREEN="\033[1m\033[32m" | |
BYELLOW="\033[1m\033[33m" | |
BBLUE="\033[1m\033[34m" | |
BMAGENTA="\033[1m\033[35m" | |
BCYAN="\033[1m\033[36m" | |
BWHITE="\033[1m\033[37m" | |
# End your colored output with this character modifier to reset to defaults. | |
RESET="\033[0m" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment