An open API service indexing awesome lists of open source software.

https://github.com/developerstoolbox/bash-colour-include

A script to create and export a set of variables which contain the 8 basic colours that can be displayed on most terminals.
https://github.com/developerstoolbox/bash-colour-include

bash colours wolfsoftware

Last synced: 4 months ago
JSON representation

A script to create and export a set of variables which contain the 8 basic colours that can be displayed on most terminals.

Awesome Lists containing this project

README

          



DevelopersToolbox logo




Github Build Status


License


Created




Release


Released


Commits since release















## Overview

This is a script that creates and exports a set of variables which contain the 8 basic colours that can be displayed on most terminals.
It could easily be extended to use more colours if wanted.

In addition it also creates and export a set of variables which handle other specific useful terminal information, cls, bold, reset etc.

The idea is for it to be included by other scripts to allow for colour to be added to a script in a clean and simple way.

## Usage

```sh
source bash-colour-include.sh

echo "${bgBlack}${fgRed}This should be red text${reset}"
echo "${bgBlack}${fgYellow}This should be yellow text${reset}"
echo "${bgWhite}${fgRed}This should be red on a white background${reset}"
```

## Does my terminal support colour ?

If you do not known if your terminal supports colour, then take a look at our [testcard](https://github.com/DevelopersToolbox/bash-colour-testcard) tool which will show you.