Metadata-Version: 2.1
Name: ansifmt
Version: 0.1.0
Summary: ANSI escape sequences to format printed strings
Home-page: https://github.com/khalid151/AnsiFmt
Author: Khalid
Author-email: khalid.y96@outlook.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown

# AnsiFmt
ANSI escape sequences to format strings that are printed to terminal.

## Usage
```python
import AnsiFmt as fmt

string = "Hello, world"

# Print the string with underline
print(fmt.underline(string))

# Set it to have red background
print(fmt.bg(string, 1))

# Color can be either an integer, a hex color string or a tuple of (red, green, blue)
print(fmt.fg(string, '#3cde2f'))

# Formats can be nested since each function returns a formatted string
print(fmt.bg(fmt.fg(fmt.bold(string), 4), 15))
```
![preview](preview.png)

## Functions
- `bg(str, color)`
- `fg(str, color)`
- `blink(str)`
- `bold(str)`
- `dim(str)`
- `double_underline(str)`
- `hide(str)`
- `invert(str)`
- `italic(str)`
- `overline(str)`
- `strike(str)`
- `underline(str)`

`color` can either be an integer of ANSI color codes, a hex color string, or a tuple of (red, green, blue) values.


