A set of script for outputting a colour testcard in bash to show bash colour support.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.travis.yml
CHANGELOG.md
CODEOWNERS
CONTRIBUTING.md
LICENSE.md
README.md
stale.yml

README.md

Build Status Software License Release Github commits (since latest release) GitHub repo size in bytes GitHub contributors

Bash Colour Testcard

This is a simple script to display a matrix of colours based on the number of colours that your terminal is able to support.

It will make best efforts to size the output to the size of your terminal making it display nicely in most terminals.

It has the following command line options

  Usage: ./bash-colour-testcard.sh [ -h ] [ -cnst ] [ -m number ]

    -h    : Print this screen
    -c    : complete mode (foreground & background [256 x 256])
    -m    : set the maximum number of colours to display (between 0-256)
    -n    : display just the number of supported colours
    -s    : simple mode (colour codes only [256])
    -t    : test mode (will prompt you for colour codes and display the results)

    Note: -c, -n, -s & -t must be used independently and not combined.

Test Mode

The -t command parameter will allow you to enter 'test mode'. In this mode the script will ask you to enter values for the foreground and background colours and it will then display that colour combination with some test text, it will show you a second test output with the text in bold.

You can test as many colour combinations are you like (or until you get bored).