A simple library to get colors in the bash terminal
Project description
# Bash color
## Available colors
* BLACK
* RED
* GREEN
* BROWN
* BLUE
* PURPLE
* CYAN
* LIGHT_GRAY
* DEFAULT
* DARK_GRAY
* LIGHT_RED
* LIGHT_GREEN
* YELLOW
* LIGHT_BLUE
* LIGHT_PURPLE
* LIGHT_CYAN
* WHITE
## Available effect
* BOLD
* DIM (not working on Konsole)
* UNDERLINE
* BLINK (not working on Konsole and Gnome Terminal)
* INVERSE
* HIDDEN (not working on Konsole)
## Example
```python
from bash import colorize, RED, UNDERLINE
print(colorize('Red color', RED))
print(colorize('Red background', background=RED))
print(colorize('Underline', effect=UNDERLINE))
```
## API
```python
def colorize(
text,
color=None,
background=None,
effects=[],
color_256=None,
background_256=None,
with_end=True):
```
## Available colors
* BLACK
* RED
* GREEN
* BROWN
* BLUE
* PURPLE
* CYAN
* LIGHT_GRAY
* DEFAULT
* DARK_GRAY
* LIGHT_RED
* LIGHT_GREEN
* YELLOW
* LIGHT_BLUE
* LIGHT_PURPLE
* LIGHT_CYAN
* WHITE
## Available effect
* BOLD
* DIM (not working on Konsole)
* UNDERLINE
* BLINK (not working on Konsole and Gnome Terminal)
* INVERSE
* HIDDEN (not working on Konsole)
## Example
```python
from bash import colorize, RED, UNDERLINE
print(colorize('Red color', RED))
print(colorize('Red background', background=RED))
print(colorize('Underline', effect=UNDERLINE))
```
## API
```python
def colorize(
text,
color=None,
background=None,
effects=[],
color_256=None,
background_256=None,
with_end=True):
```
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bashcolor-1.0.0.tar.gz
(2.3 kB
view details)
Built Distribution
File details
Details for the file bashcolor-1.0.0.tar.gz
.
File metadata
- Download URL: bashcolor-1.0.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bb0238ba2c551d5ae55d4b8b05d65bb31cbcc2b24946373d24f11918692a6c2 |
|
MD5 | 6912eb489640b1bc5d91a7267a551664 |
|
BLAKE2b-256 | 46dbdce1851c68fc11dafcd1929d8f25e4c9d0e5f47dd7af510ec0bbf540047a |
Provenance
File details
Details for the file bashcolor-1.0.0-py2-none-any.whl
.
File metadata
- Download URL: bashcolor-1.0.0-py2-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a112505c5499d2e42cb156e04ddb095f9527bd2c3ef124c27a44ba0b15efaa9d |
|
MD5 | f7bace2512647434c0c811f58bc02381 |
|
BLAKE2b-256 | bcd57e7e321ef451e02fe330b86981248276c2a13d90c6c7da4e2e9d28a01788 |