Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/kasper9n/my-bash-scripts. My personal bash scripts
Something went wrong. Try again.
488 B · 24 lines
at master
12345678910111213141516171819202122232425#! /bin/bash
help() { echo "Turn text colorful. To see all available colors, run `color 3 color --list`." echo "" echo "`color 2 Usage:` color <color number>" echo "" echo "`color 2 Example:` echo Hello \`color 2 world\`" echo ""}
# no argsif [[ "$#" < 1 ]]; then help; exit 0; fi
if [[ "$1" == "--list" ]]; then printall() { for ((i=0;i<256;i++)); do echo "`tput setaf $i`$i`tput sgr0`" done } printallfi
echo -n "`tput setaf $1`${@:2}`tput sgr0`"