Skip to content

Instantly share code, notes, and snippets.

@niw
Created December 31, 2024 14:18
Show Gist options
  • Save niw/e9b0bf3ad511ce63e1d2789b32c8e82b to your computer and use it in GitHub Desktop.
Save niw/e9b0bf3ad511ce63e1d2789b32c8e82b to your computer and use it in GitHub Desktop.
Prints each color in the palette on terminal emulator.
#!/usr/bin/env bash
for i in {0..255}; do
printf "\x1b[48;5;%sm%3d\e[0m " "$i" "$i"
if (( i == 15 )) || (( i > 15 )) && (( (i-15) % 6 == 0 )); then
printf "\n"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment