-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
62 additions
and
3 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Hues | ||
|
||
This is the 90s and your terminal can display _16_ glorious colors. | ||
Your Python scripts deserve the some color love. `Hues` makes printing | ||
to console in color easy. | ||
|
||
Just grab the package from `PIP`, and your monochromatic days will be a | ||
thing of past! | ||
|
||
## Quickstart | ||
|
||
Go, grab the latest version from PIP. Run: | ||
|
||
```bash | ||
pip install hues | ||
``` | ||
|
||
Then, in your scripts, do this: | ||
|
||
```python | ||
>>> from hues import hue | ||
>>> print(hue('unicorns!').bright_cyan.bold) | ||
``` | ||
|
||
|
||
_whoa!_ | ||
|
||
All the colors, styles and backgrounds are available as object attributes. The chainable syntax is optimized deterministically using a push down automaton, so when you're being particularly indecisive, you can: | ||
|
||
```python | ||
>>> print(hue('MONDAY!').bold.red.bg_green.underline.bright_yellow) | ||
``` | ||
|
||
and there won't be a single trace of `red` in your `bright yellow` message to mondays. | ||
|
||
Each `hue` string is self closing, so you can't accidentally color your whole terminal yellow because you forgot the `reset` escape sequence. | ||
|
||
|
||
## Colors | ||
|
||
All 16 glorious ANSI colors are available for both background and foreground. Assorted text styles such as **`bold`**, _`italics`_ and <u>`underline`</u> are also available. Too many colors? Worry not fam, go to town with `reset` attribute. | ||
|
||
|
||
## Todo | ||
- [ ] Expand this readme. | ||
- [ ] Add screenshots! | ||
- [ ] Unicorns required. | ||
|
||
> Back in my days, we didn't even have colors! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
site_name: hues | ||
site_url: https://hues.noop.pw | ||
repo_url: https://github.com/prashnts/hues/ | ||
site_author: Prashant Sinha | ||
|
||
markdown_extensions: | ||
- smarty | ||
- toc: | ||
permalink: True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters