11# ContrastCheck
22
3- [ ![ Python Version] ( https://img.shields.io/badge/python-3.8 +-blue.svg )] ( https://www.python.org/downloads/ )
3+ [ ![ Python Version] ( https://img.shields.io/badge/python-3.10 +-blue.svg )] ( https://www.python.org/downloads/ )
44[ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( https://opensource.org/licenses/MIT )
55
66A powerful tool for analyzing text-background contrast ratios in UI screenshots using PaddleOCR and K-means clustering to ensure WCAG accessibility compliance.
@@ -18,36 +18,60 @@ A powerful tool for analyzing text-background contrast ratios in UI screenshots
1818
1919### Prerequisites
2020
21- - Python 3.8 or higher
22- - pip package manager
21+ - Python 3.10 or higher
22+ - [ uv ] ( https://github.com/astral-sh/uv ) - Fast Python package and project manager
2323
24- ### Install from source
24+ ### Install uv
25+
26+ If you don't have uv installed:
2527
2628``` bash
27- git clone https://github.com/longweillw-blip/ContrastCheck.git
28- cd ContrastCheck
29- pip install -e .
29+ # On macOS and Linux
30+ curl -LsSf https://astral.sh/uv/install.sh | sh
31+
32+ # On Windows
33+ powershell -c " irm https://astral.sh/uv/install.ps1 | iex"
34+
35+ # Or via pip
36+ pip install uv
3037```
3138
32- ### Install dependencies
39+ ### Install from source
3340
3441``` bash
35- pip install -r requirements.txt
42+ git clone https://github.com/longway-code/ContrastCheck.git
43+ cd ContrastCheck
44+
45+ # Create virtual environment with uv (Python 3.10+)
46+ uv venv --python 3.10
47+
48+ # Activate virtual environment
49+ # On macOS/Linux:
50+ source .venv/bin/activate
51+ # On Windows:
52+ .venv\S cripts\a ctivate
53+
54+ # Install the package
55+ uv pip install -e .
3656```
3757
38- For development:
58+ ### Install dependencies
3959
4060``` bash
41- pip install -r requirements-dev.txt
61+ # Production dependencies
62+ uv pip install -r requirements.txt
63+
64+ # Development dependencies
65+ uv pip install -r requirements-dev.txt
4266```
4367
4468### GPU Support (Optional)
4569
4670For faster OCR processing with GPU:
4771
4872``` bash
49- pip uninstall paddlepaddle
50- pip install paddlepaddle-gpu
73+ uv pip uninstall paddlepaddle
74+ uv pip install paddlepaddle-gpu
5175```
5276
5377## Quick Start
@@ -227,6 +251,19 @@ ContrastCheck/
227251
228252## Development
229253
254+ ### Setup Development Environment
255+
256+ ``` bash
257+ # Create virtual environment with Python 3.10+
258+ uv venv --python 3.10
259+
260+ # Activate virtual environment
261+ source .venv/bin/activate # On Windows: .venv\Scripts\activate
262+
263+ # Install in development mode with dev dependencies
264+ uv pip install -e " .[dev]"
265+ ```
266+
230267### Running Tests
231268
232269Run all tests:
@@ -310,15 +347,15 @@ If you use ContrastCheck in your research or project, please cite:
310347 title = {ContrastCheck: UI Screenshot Contrast Ratio Analyzer},
311348 author = {ContrastCheck Contributors},
312349 year = {2026},
313- url = {https://github.com/longweillw-blip /ContrastCheck}
350+ url = {https://github.com/longway-code /ContrastCheck}
314351}
315352```
316353
317354## Support
318355
319356If you encounter any issues or have questions:
320357
321- - Open an issue on [ GitHub] ( https://github.com/yourusername /ContrastCheck/issues )
358+ - Open an issue on [ GitHub] ( https://github.com/longway-code /ContrastCheck/issues )
322359- Check the [ examples] ( examples/ ) directory for usage examples
323360- Read the [ WCAG 2.1 documentation] ( https://www.w3.org/WAI/WCAG21/quickref/ ) for accessibility guidelines
324361
0 commit comments