Simple and lightweight shell color output function.
Project description
# python-kolors
Simple and lightweight shell color output function.
It also checks if terminal supports color before vomitting ANSI codes.
## Usage
```python
from kolors import c
print c('Some <red>Red</end> and <blue>blue</end> text')
print c('<green bg>Some green background</end>')
print c('Some <cyan bold bg>{}</end>').format('interpolation')
```
**Note**: the keyword in the closing tag isn't really relevant, but I like to
use "</end>" everywhere for shortness and consistency. Simple shell color
output function.
## Colors
* grey (alias: gray)
* red
* green
* yellow
* blue
* magenta (alias: purple)
* cyan
* white
# Styles
* bold
* bg
Simple and lightweight shell color output function.
It also checks if terminal supports color before vomitting ANSI codes.
## Usage
```python
from kolors import c
print c('Some <red>Red</end> and <blue>blue</end> text')
print c('<green bg>Some green background</end>')
print c('Some <cyan bold bg>{}</end>').format('interpolation')
```
**Note**: the keyword in the closing tag isn't really relevant, but I like to
use "</end>" everywhere for shortness and consistency. Simple shell color
output function.
## Colors
* grey (alias: gray)
* red
* green
* yellow
* blue
* magenta (alias: purple)
* cyan
* white
# Styles
* bold
* bg
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
kolors-0.0.2.tar.gz
(2.0 kB
view hashes)
Built Distribution
Close
Hashes for kolors-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2da4351562d8e7e0422a492ba9c6cd19636f5b828e9e62cec1a82909a24c2c00 |
|
MD5 | 2f49031843b1210ae547bcb8e89f0efa |
|
BLAKE2b-256 | 4865f82a994ce263ed46bac2680f761c21949d91e4b3f704a7dfa647e0c76c29 |