Practical Pigment Mixing for Digital Painting
Project description
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
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
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 click here.License
Copyright (c) 2022, Secret Weapons. All rights reserved.
This code is for non-commercial use only. It is provided for research and evaluation purposes.
If you wish to obtain commercial license, please contact: mixbox@scrtwpns.com
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pymixbox-0.0.1.tar.gz
(4.7 MB
view hashes)
Built Distribution
Close
Hashes for pymixbox-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e11844e027f9d77e1a7b3c4b4bab1cd57bca3dff1adaf2131399cfc55fcb6d1e |
|
MD5 | 82f282bd447c1cda5aacb40a52ee83d8 |
|
BLAKE2b-256 | 0763d4d6deda24d0cda97a9ad4d724a9fcac5b07f50bcd1e3d56ad765d51f0bf |