Metadata-Version: 2.5
Name: murex
Version: 0.1.1
Summary: What simulations of artists' media share: pigments that mix like the real thing (spectral Kubelka-Munk), stroke paths, textures and reference images.
Project-URL: Homepage, https://github.com/joce/murex
Project-URL: Repository, https://github.com/joce/murex
Project-URL: Issues, https://github.com/joce/murex/issues
Project-URL: Changelog, https://github.com/joce/murex/blob/main/CHANGELOG.md
Author-email: Jocelyn Legault <jocelynlegault@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: color,color-mixing,generative-art,kubelka-munk,noise,pigment,spectral,spline
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Artistic Software
Classifier: Topic :: Multimedia :: Graphics
Classifier: Typing :: Typed
Requires-Python: <4.0,>=3.11
Requires-Dist: numba>=0.57
Requires-Dist: numpy>=1.24
Provides-Extra: pil
Requires-Dist: pillow>=9.1; extra == 'pil'
Description-Content-Type: text/markdown

# murex

[![CI](https://github.com/joce/murex/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/joce/murex/actions/workflows/ci.yml)
[![Coverage](https://codecov.io/gh/joce/murex/graph/badge.svg)](https://codecov.io/gh/joce/murex)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![GitHub License](https://img.shields.io/github/license/joce/murex)](https://github.com/joce/murex/blob/main/LICENSE)

What simulations of artists' media share. The murex is the sea snail Tyrian
purple was made from; this is where [oilpaint](https://github.com/joce/oilpaint)
and [fusain](https://github.com/joce/fusain) get their colour.

- `Pigment` and `murex.spectral`: colours as pigments that mix like the real
  thing (blue and yellow give green, not grey), using spectral Kubelka-Munk
  theory over 24 bands.
- `Bezier`, `CatmullRom`, `Polyline`: stroke paths resampled by arc length,
  and values that vary along a stroke.
- `murex.noise`: textures (paper, weaves, wood grain).
- `Reference`: a reference image, asked for its colour, direction and detail
  at the scale of the tool in hand.
- `write_png` and `murex.filters`: output and small image filters.

```python
from murex import Pigment, mix_colors

mix_colors(["#1b3fa0", "#f5d000"])        # a green
glaze = Pigment("#8e1b2c", opacity=0.3)   # a transparent crimson
glaze.appearance(thickness=1.0, over="#f2c80f")
```

## Development

```bash
uv sync --group dev --frozen   # install the package and the development tools
uv run pytest                  # run the tests
make pre-push                  # what CI runs: tox, coverage, spelling
```

## License

[MIT](LICENSE)
