Created
December 11, 2018 20:37
-
-
Save havocesp/a3ea613f12c31b5a23ea549f7f3617a4 to your computer and use it in GitHub Desktop.
Shell colors &styles with `tput`
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
# BASH Receipes | |
# ================================================================ | |
# The "tput" magic | |
# ================================================================ | |
tput bold # Bold effect | |
tput rev # Display inverse colors | |
tput sgr0 # Reset everything | |
tput setaf <code> # Set foreground color | |
tput setab <code> # Set background color | |
# ================================================================ | |
# Various color codes for the tput command | |
# ================================================================ | |
# Code Color | |
# ---- ----- | |
# Black 0 | |
# Red 1 | |
3 Green 2 | |
# Yellow 3 | |
# Blue 4 | |
# Magenta 5 | |
# Cyan 7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment