Metadata-Version: 2.1
Name: colorblind-pdf
Version: 0.2.0
Summary: A package to process PDFs for testing colorblind accessibility.
Author-email: David Völgyes <david.volgyes@ieee.org>
Project-URL: Home, https://github.com/dvolgyes/colorblind_pdf/
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click ~=8.1.7
Requires-Dist: PyMuPDF ~=1.23
Requires-Dist: Pillow ~=10.1
Requires-Dist: numpy ~=1.26.2
Requires-Dist: loguru ~=0.7.2
Requires-Dist: opencv-python ~=4.8.1.78
Requires-Dist: colorblind


# colorblind_pdf

![PyPI](https://img.shields.io/pypi/v/colorblind_pdf)
![Python Version](https://img.shields.io/pypi/pyversions/colorblind_pdf)
![License](https://img.shields.io/github/license/dvolgyes/colorblind_pdf)
![Downloads](https://img.shields.io/pypi/dm/colorblind_pdf)
![Issues](https://img.shields.io/github/issues/dvolgyes/colorblind_pdf)
![Pull Requests](https://img.shields.io/github/issues-pr/dvolgyes/colorblind_pdf)

`colorblind_pdf` is a tool designed to test the accessibility of PDF documents for individuals with color vision deficiencies. It processes PDFs to simulate how the contained images would appear to someone with various types of color vision deficiencies, such as deuteranopia, protanopia, and tritanopia.

## Installation

To install `colorblind_pdf`, use pipx for an isolated installation:

```bash
pipx install colorblind_pdf
```

## Usage

To use `colorblind_pdf`, provide the path to the PDF you want to process, the output directory, and specify the type of color deficiency simulation. For example:


Most simple way:

```bash
colorblind_pdf my_document.pdf
```

### Default values

-o/--output_dir: current directory ('.')

-d/--deficiency_type: all deficiencies ('all')

-D/--dpi: resolution (default: 150 DPI)

--merge: merge the outputs into a single file where each page is a mosaic

-O/--overlay: merged output will get an overlay over the subpages

The test.pdf with merged, overlayed output should look like this:

![merged example](tests/test_merged_cvd.jpg)



## Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request on our [GitHub repository](https://github.com/dvolgyes/colorblind_pdf).

## License

Distributed under the MIT License. See `LICENSE` for more information.
