Metadata-Version: 2.1
Name: colortextpy
Version: 0.0.3.1
Summary: Colortextpy is a Python package for adding colors and styles to terminal output, allowing you to create more visually appealing and organized command-line applications.
Home-page: https://github.com/susuky/colortextpy
Author: ping
Author-email: hpisj322@gmail.com
License: Apache Software License 2.0
Keywords: console color terminal text formatting notebook python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Provides-Extra: dev
License-File: LICENSE

# colortextpy

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Install

Tested on python 3.6-3.11, win11, win11 WSL2, Ubuntu, Nvidia Jetson Nano

It doesn’t support win10

``` sh
pip install colortextpy
```

## Usage

### Printer

``` python
from colortextpy import Printer, colorprint

Printer.red_print('red')
Printer.red_print('red', bold=True)

colorprint('violet', color='#aa00ff')
colorprint('bold violet', color='#aa00ff', bold=True)
colorprint('bold violet', color='violet', background=(224, 224, 224), bold=True)
```

![](images/2.png)

### Color

Some Constant of color with **hex**, **rgb**, **bgr** format

``` python
Color.red.name, Color.red.hex, Color.red.rgb, Color['red']
```

    ('red', '#ff0000', (255, 0, 0), <Color.red>)

`Color.available` :

![0.png](images/0.png)

You can also use it with `matplotlib.pyplot`:

``` python
plt.plot(np.sin(np.linspace(-4, 4, 50)), color=Color.red.hex)
```

![](index_files/figure-commonmark/cell-5-output-1.png)
