https://github.com/butterroach/tercol
TerCol is a library that colors your text.
https://github.com/butterroach/tercol
python python-library terminal-coloring terminal-styling
Last synced: 3 months ago
JSON representation
TerCol is a library that colors your text.
- Host: GitHub
- URL: https://github.com/butterroach/tercol
- Owner: Butterroach
- License: mit
- Created: 2022-10-11T14:49:32.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-01-01T07:47:43.000Z (5 months ago)
- Last Synced: 2025-03-02T05:19:41.151Z (3 months ago)
- Topics: python, python-library, terminal-coloring, terminal-styling
- Language: Python
- Homepage: https://butterroach.github.io/tercol/
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# **[TerCol](https://pypi.org/project/tercol/)**
[](https://github.com/psf/black) [](https://github.com/Butterroach/tercol/actions/workflows/test.yml)
TerCol is a small, pure Python library that allows you to color and style text output. TerCol has no dependencies and only requires Python 3.7 or newer. It also supports true color.
## Usage
```python
import tercolprint(tercol.red('Red text'))
print(tercol.blue('Blue text'))
print(tercol.rgb(255, 215, 0, 'Gold text using RGB'))
print(tercol.hexa(0xffd700, 'Gold text using HEX'))
print(tercol.hsv(51, 100, 100, 'Gold text using HSV'))
print(tercol.rainbowtext('Rainbow text'))
```## Requirements
TerCol only requires Python 3.7 or newer. No additional dependencies are needed.
## Pros
- Small size
- Pure Python
- No dependencies
- Simple automatic reset handling
- IDE-autocomplete friendly
- True color support## Cons
- Limited support of nested styles
- Only supports Python 3.7+## License
TerCol is licensed under the MIT license. See the LICENSE file for more info.