https://github.com/tcodes0/hue-bash-colors
Easy, readable color management
https://github.com/tcodes0/hue-bash-colors
ansi ansi-colors bash cli color terminal xterm-256color
Last synced: 3 months ago
JSON representation
Easy, readable color management
- Host: GitHub
- URL: https://github.com/tcodes0/hue-bash-colors
- Owner: tcodes0
- License: bsd-3-clause
- Created: 2018-05-07T18:50:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-02T20:31:28.000Z (almost 7 years ago)
- Last Synced: 2025-07-14T00:51:48.545Z (3 months ago)
- Topics: ansi, ansi-colors, bash, cli, color, terminal, xterm-256color
- Language: Shell
- Homepage:
- Size: 11.7 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Hue

## Use Hue like echo**To view the above message use -h or --help:**
$ hue.sh -h
**Classic ANSI colors have switches with their names:**
$ hue.sh --teal will show in teal
**They all have a *light-* variant:**
$ hue.sh --light-teal will show in light teal
--default will probably be a light tone on a dark background terminal, and a black tone in a white themed one.
--white will always show white, just like --black will show black.
Don't ask me what light-white means, thoughWhen using --bold the color becomes the light- version automatically.
**256color is available using **--hue=**_color\_code_:**
$ hue.sh --hue=79 a blend of teal and green perhaps?
$ hue.sh --hue=53 reminds me of grapes**Add styles using switches too:**
$ hue.sh --bold Important text.
$ hue.sh --underline remember this.View the complete list of styles and ANSI color switches using `$ hue.sh -h`
**Add backgrounds using **--bg=**_ANSI\_color_:**
$ hue.sh --bg=pink a pink box with text
**256color backgrounds need the --swap switch:**
$ hue.sh --hue=172 --swap will show in a dark orange background
**256color background with ANSI text color:**
$ hue.sh --hue=172 --swap --bg=teal same as above, with teal text
--swap exchanges foreground and background color, try it!
**To view all 256color codes use:**
$ hue.sh --view=256

**To view all ANSI colors:**
$ hue.sh --view=ansi

## Other things it does
**Output internal code, for your reuse:**
$ hue.sh --hue=99 --swap --underline --code
< printf "\033[4;7;38;05;99m\033[0m"**Suppress newline printing:**
$ hue.sh -n
$ hue.sh --newline**Classic ANSI color dump:**
$ hue.sh --palette
All combinations of ANSI colors, backgrounds and styles. _Warning: long output!_
**The help message is there to help:**
$ hue.sh -h
## Installation
Download or clone the repo, then put hue.sh in your `$HOME/bin/` directory (or whatever directory you use for bash scripts)
## A note from me
I wrote this for my own use to make coloring the terminal easier (to do, remember and read).
I like the --code switch specially.#### _Make the shell work for you!_