Metadata-Version: 2.1
Name: pymixbox
Version: 0.0.2
Summary: Practical Pigment Mixing for Digital Painting
Author: Secret Weapons
Author-email: mixbox@scrtwpns.com
License: CC-BY-NC-4.0
Project-URL: homepage, https://scrtwpns.com/mixbox
Project-URL: repository, https://github.com/scrtwpns/pigment-mixing
Keywords: pigment,color mixing,kubelka munk
Description-Content-Type: text/markdown
License-File: LICENSE

# Mixbox: Practical Pigment Mixing for Digital Painting

Mixbox is a pigment mixing black-box. You pass RGB colors in and get the mixed RGB out.
Internally, Mixbox treats the colors as if they were made of actual real-world pigments.
It uses the Kubelka & Munk theory to predict the color of the resulting mixture.
This way, Mixbox achieves that blue and yellow mix to green, the same way real pigments do.

## Usage

```python
import mixbox 

rgb1 = (252,211, 0)  # bright yellow
rgb2 = ( 28, 18,75)  # deep blue
t = 0.5              # mixing ratio

rgb_mix = mixbox.lerp(rgb1,rgb2,t)

print(rgb_mix)
```

## Demo
<p align="center">
  <a href="https://scrtwpns.com/mixbox/painter"><img src="https://scrtwpns.com/mixbox/painter_git.jpg"/></a>
</p>
This is a toy painting app with soft round brush and a smudge tool. It runs two color mixing implementations in parallel: one based on Mixbox and the other that performs ordinary RGB mixing. The app allows switching between them on the fly, showing the differences between pigment-based mixing and the normal RGB mixing. To launch the demo in your browser, please <a href="https://scrtwpns.com/mixbox/painter">click here</a>.

## License
Copyright (c) 2022, Secret Weapons. All rights reserved.<br>
This code is for non-commercial use only. It is provided for research and evaluation purposes.<br>
If you wish to obtain commercial license, please contact: mixbox@scrtwpns.com
