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.1.tar.gz
(2.5 kB
view details)
Built Distribution
File details
Details for the file bashcolor-1.0.1.tar.gz
.
File metadata
- Download URL: bashcolor-1.0.1.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b44de25e803891bfcbbeb11598b1db9b64b121b27fd14072163f716b721d9131 |
|
MD5 | cbd4f6a9ea46f513fc14b6dd839ce1a1 |
|
BLAKE2b-256 | 356c04a82406bf58e9349c6b5d9e5f78d68397540a90d0521cbfa6df3adf1e97 |
Provenance
File details
Details for the file bashcolor-1.0.1-py2-none-any.whl
.
File metadata
- Download URL: bashcolor-1.0.1-py2-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cc2b83aee630b659fe504cf15f9334b6b4630de340cd09ae49a93858f84ba14 |
|
MD5 | 694bc8acaac31ea589948362545a4db1 |
|
BLAKE2b-256 | 72914a4a070943a5401cf6f90e6b7472692fc351b1572dfd812818f8ac5ac165 |