Print a 256-color test pattern in the terminal

256-colour test pattern

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 :)


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.