Skip to content

Instantly share code, notes, and snippets.

@umanda
Created April 19, 2020 06:56
Show Gist options
  • Save umanda/a4a6ca00b18e2cb2c5b441aa3ed878ba to your computer and use it in GitHub Desktop.
Save umanda/a4a6ca00b18e2cb2c5b441aa3ed878ba to your computer and use it in GitHub Desktop.
Colors In Terminal
for code in {30..37}; do \
echo -en "\e[${code}m"'\\e['"$code"'m'"\e[0m"; \
echo -en " \e[$code;1m"'\\e['"$code"';1m'"\e[0m"; \
echo -en " \e[$code;3m"'\\e['"$code"';3m'"\e[0m"; \
echo -en " \e[$code;4m"'\\e['"$code"';4m'"\e[0m"; \
echo -e " \e[$((code+60))m"'\\e['"$((code+60))"'m'"\e[0m"; \
done
for code in {0..255}
do echo -e "\e[38;5;${code}m"'\\e[38;5;'"$code"m"\e[0m"
done
@kishan1265
Copy link

is there any code of this type in c language ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment