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.
- Host: GitHub
- URL: https://github.com/developerstoolbox/bash-colour-include
- Owner: DevelopersToolbox
- License: mit
- Created: 2021-02-15T11:55:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-25T04:30:09.000Z (11 months ago)
- Last Synced: 2024-11-25T05:23:50.710Z (11 months ago)
- Topics: bash, colours, wolfsoftware
- Language: Shell
- Homepage:
- Size: 88.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Citation: CITATION.cff
- Codeowners: .github/CODEOWNERS
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
## 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.shecho "${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.