How do I print a 256-colour test pattern in my terminal?
I want to check that my terminal correctly supports 256 colours.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityHow do I print a 256-colour test pattern in my terminal?
I want to check that my terminal correctly supports 256 colours.
256-colour test pattern
For the above, you can use my bash code. ("Look Ma, no subprocesses!")
Or for a bash quicky:
for i in {0..255} ; do
printf "\x1b[38;5;${i}m%3d " "${i}"
if (( $i == 15 )) || (( $i > 15 )) && (( ($i-15) % 12 == 0 )); then
echo;
fi
done
24-bit / truecolour test pattern
See this question for the full spectrum :)
printf
is not a builtin -- so this does indeed use subprocesses
Install an application named colortest
and use the following commands to test the ASCII color graph
colortest-8 => Display color palette using 8 colors.
colortest-16 => Display color palette using 16 colors.
colortest-256 => Display color palette using 256 colors.
colortest
package originate? It doesn’t appear to be in the Fedora or Arch repos.
ubuntu
. For more info, refer this link vim.org/scripts/script.php?script_id=1349