Apply basic color-oriented image operations.
Maintained. Last release 3 months ago, commits in 2 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install color-operationscolor-operations (fork of rio-color )
Apply basic color-oriented image operations.
Modified version of Mapbox's rio-color, removing rasterio dependency and with python>=3.10 compatibility.
Install
You can install color-operations using pip
python -m pip install -U pip
python -m pip install color-operations
or build from source
We recommand using uv as project manager for development.
See https://docs.astral.sh/uv/getting-started/installation/ for installation
git checkout https://github.com/vincentsarago/color-operations.git
cd color-operations
uv sync
Operations
Gamma adjustment adjusts RGB values according to a power law, effectively brightening or darkening the midtones. It can be very effective in satellite imagery for reducing atmospheric haze in the blue and green bands.
Sigmoidal contrast adjustment can alter the contrast and brightness of an image in a way that matches human's non-linear visual perception. It works well to increase contrast without blowing out the very dark shadows or already-bright parts of the image.
Saturation can be thought of as the "colorfulness" of a pixel. Highly saturated colors are intense and almost cartoon-like, low saturation is more muted, closer to black and white. You can adjust saturation independently of brightness and hue but the data must be transformed into a different color space.






