1

I want to check that my terminal supports 256 colours.

How do I print a 256-colour test pattern in my terminal?

1

1 Answer 1

2

256-colour test pattern

256-colour test pattern

For the above, you can use my bash code.

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
2

Not the answer you're looking for? Browse other questions tagged .