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-0.9.1.tar.gz
(2.3 kB
view details)
Built Distribution
File details
Details for the file bashcolor-0.9.1.tar.gz
.
File metadata
- Download URL: bashcolor-0.9.1.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 891957786c1d274f43a3d5d21c33216519d739df141eb42ebb4a7a0512f9c2c6 |
|
MD5 | 85991c8f0f417800c83c303bd1912583 |
|
BLAKE2b-256 | 614af8ad76731d39dd55bdad4800ad48763cb9a003b945813512d4138e4d6a3b |
File details
Details for the file bashcolor-0.9.1-py2-none-any.whl
.
File metadata
- Download URL: bashcolor-0.9.1-py2-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1559868fd80f549965d514e41f1367c6c77bf286a65cc0d59bf7e6a8f0b99e68 |
|
MD5 | fd1ec2fdb4d0a3256fbff379263629cb |
|
BLAKE2b-256 | db6b5b6ad56ff4ac5aff2f4f21494623747639d3186f6ff59e2b3f391e615c4a |