Metadata-Version: 2.4
Name: cm-colors
Version: 0.5.0
Summary: Automatically fix hard-to-read text colors by making your website readable without changing your original color theme—simple Python API and CLI.
Home-page: https://github.com/comfort-mode-toolkit/cm-colors
Author: Lalitha A R
Author-email: arlalithablogs@gmail.com
Project-URL: Documentation, https://cm-colors.readthedocs.io/en/latest/
Project-URL: Bug Reports, https://github.com/comfort-mode-toolkit/cm-colors/issues
Project-URL: Source, https://github.com/comfort-mode-toolkit/cm-colors
Keywords: accessibility,color-contrast,wcag,a11y,css-colors,automated-accessibility,color-fixing,contrast-tuning,readable,legible
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Utilities
Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: tinycss2<2.0.0,>=1.2.0
Requires-Dist: click<9.0.0,>=8.0.0
Requires-Dist: rich>=10.0.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# CM-Colors 🎨✨

[![Python Tests](https://github.com/comfort-mode-toolkit/cm-colors/actions/workflows/python-test.yml/badge.svg)](https://github.com/comfort-mode-toolkit/cm-colors/actions/workflows/python-test.yml)
![PyPI - Version](https://img.shields.io/pypi/v/cm-colors)
![Downloads](https://img.shields.io/pypi/dm/cm-colors)
![License](https://img.shields.io/github/license/comfort-mode-toolkit/cm-colors)

**Color contrast that works for everyone**

CM-Colors automatically fixes your colors so they are easy to read. It finds similar colors that work for everyone, so you don't have to guess.

The percentage shows how much easier the text is to read:

<img width="1189" height="1110" alt="an image showing side by side comparision of before and after change of colors" src="https://github.com/user-attachments/assets/4ce92c65-cd27-4bae-8756-bbbe9bf70a91"  />

## Overview

Spending too much time adjusting colors? CM-Colors handles it for you. It automatically finds colors that look like your brand but are readable for all your visitors.

**What it does:**

- **Fixes colors automatically**: No more manual tweaking.
- **Works everywhere**: Fix Python code or CSS files.
- **Keeps your style**: Changes colors as little as possible.
- **Saves you time**: Fix your whole project in seconds.

## Installation

```bash
pip install cm-colors
```

## Quick Start

### Fix a single color

```python
from cm_colors import ColorPair

# Your colors
pair = ColorPair("#999999", "#ffffff")

# Fix them and preview in the terminal
fixed_color, success = pair.make_readable(show=True)

print(f"Use {fixed_color} instead of #999999")
# Output: Use #8e8e8e instead of #999999
```

### Fix many colors at once

```python
from cm_colors import make_readable_bulk

my_colors = [
    ("#777", "#fff"),
    ("#888", "#000"),
]

results = make_readable_bulk(my_colors)

for color, status in results:
    print(f"{color} is {status}")
```

### Fix CSS files

Run this in your terminal to fix all colors in a CSS file:

```bash
cm-colors styles.css
```

This creates `styles_cm.css` with readable colors which you can preview before you modify your original css

## Documentation

For more details, see the [full documentation](https://cm-colors.readthedocs.io/en/latest/).

## License

GNU General Public License v3.0

## Support

Found a problem? [Let us know](https://github.com/comfort-mode-toolkit/cm-colors/issues).

---

**Stop guessing, start building.**
