Metadata-Version: 2.1
Name: colort
Version: 1.0.0
Summary: Display colored text in the terminal.
Author-email: thep0y <thepoy@163.com>
License: MIT License
        
        Copyright (c) 2021 thep0y
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: homepage, https://github.com/thep0y/colort
Project-URL: repository, https://github.com/thep0y/colort
Keywords: color,terminal
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3
Description-Content-Type: text/markdown
License-File: LICENSE

<h1 align="center">Colort</h1>

<p align="center">
    <a href="https://pepy.tech/project/colort"><img alt="Downloads" src="https://static.pepy.tech/badge/colort"></a>    
    <a href="https://pepy.tech/project/colort"><img alt="Downloads" src="https://static.pepy.tech/badge/colort/month"></a>
    <a href="https://pepy.tech/project/colort"><img alt="Downloads" src="https://static.pepy.tech/badge/colort/week"></a>
</p>

This module provides functions for formatting text with ANSI escape codes to add color and style.

## Installation

```shell
pip install colort
```

## Usage

```python
from colort import colorize
```

The `colorize` function takes a string and any number of `Style` and `*Color` enums. It returns the string formatted with the specified styles.

For example:

```python
from colorformat import colorize, ForegroundColor as fc, Style

colored_text = colorize('Hello World!', fc.GREEN, Style.BOLD)
print("colored text: ", colored_text)
```

This will print the text in bold and green.

![截屏2023-08-06 11.03.47](https://s1.ax1x.com/2023/08/06/pPANNxs.png)

The available formatting options are:

### Colors

- ForegroundColor
  - BLACK, RED, GREEN, YELLOW, BLUE, etc.
- BackgroundColor
  - BLACK, RED, GREEN, YELLOW, BLUE, etc.

### Styles

- Style
  - NORMAL, BOLD, UNDERLINE, BLINK, INVERT, HIDE

Multiple styles can be combined:

```python
colorize('Text', ForegroundColor.WHITE, BackgroundColor.RED, Style.BOLD)
```

