Metadata-Version: 2.4
Name: mantis-colors
Version: 0.1.1
Summary: A simple and powerful terminal color library with RGB, HEX, and styles
Author: Adyanth M
License: MIT License
        
        Copyright (c) [2026] [Adyanth M]
        
        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/adyanthm/mantis-colors
Project-URL: Repository, https://github.com/adyanthm/mantis-colors
Keywords: terminal,color,ansi,rgb,cli,hex
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE.md
Dynamic: license-file

# mantis-colors

A simple, lightweight, and modern Python library for adding color and style to your terminal output.

---

## Installation

```bash
pip install mantis-colors
```

## Quick Start

```python
from mantis_colors import fg, bg, style, init

# You can initialize with autoreset so you don't have to manually reset colors after every color change!
init(autoreset_enabled=True)

print(fg.red + "red color")
print(bg.blue + fg.white + "white text on blue background")
print(fg.hex("#ff6600") + style.bold + "bold orange text using HEX")
```

---

## Features

### Colors (Standard & True Color)
Mantis Colors supports standard ANSI colors, as well as **RGB** and **HEX** for 24-bit True Color support.

```python
from mantis_colors import fg, bg

# Standard colors
print(fg.green + "success!")
print(fg.red + "error!")

# RGB Support
print(fg.rgb(255, 100, 0) + "RGB orange")
print(bg.rgb(0, 100, 255) + "RGB blue background")

# HEX Support (with or without #)
print(fg.hex("#ff6600") + "HEX orange")
print(bg.hex("0066ff") + "HEX blue background")
```

### Text Styles
Apply common text decorations with ease.

```python
from mantis_colors import style

print(style.bold + "Bold Text")
print(style.underline + "Underlined Text")
print(style.strikethrough + "Strikethrough")
print(style.bold + style.italic + "Bold and Italic")
```

### Automatic Reset
Are you tired of manually adding `reset` every time? Use `init()` or `autoreset()` to handle it globally.

> [!NOTE]
> When `autoreset` is enabled, use string concatenation (`+`) instead of commas (`,`) in `print()` to ensure colors apply correctly to the entire output.

```python
from mantis_colors import init, fg, autoreset
autoreset()
print(fg.red + "Everything is reset after each print call automatically")

# or 
init(autoreset_enabled=True)
print(fg.red + "Everything is reset after each print call automatically")
```

---

## Comparison

| Feature | `mantis-colors` | `colorama` | `termcolor` |
| :--- | :---: | :---: | :---: |
| **RGB Support** | ✅ | ❌ | ❌ |
| **HEX Support** | ✅ | ❌ | ❌ |
| **Simple API** | ✅ | ✅ | ✅ |
| **Auto-reset** | ✅ | ✅ | ❌ |

---

## License
MIT © [Adyanth M](https://github.com/adyanthm)
