Skip to content

Instantly share code, notes, and snippets.

@tony-sol
Last active August 1, 2025 16:31
Show Gist options
  • Save tony-sol/0308623ed6bf2e12a2e8891595344f7b to your computer and use it in GitHub Desktop.
Save tony-sol/0308623ed6bf2e12a2e8891595344f7b to your computer and use it in GitHub Desktop.
Print all 256 colors in truecolor term
for i in {0..255}
do
printf "\x1b[38;5;%smcolour%s " "${i}" "${i}"
if (( ($i + 1) % 8 == 0 ))
then
echo ""
fi
done
# or
# for i in {0..255}; do printf "\x1b[38;5;${i}mcolor${i} - ██████████\n"; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment