Skip to main content

fuzcolor

Simple and easy to use Python library for fuzzy color models: a pixel belongs to every named color to a degree. Built on fuzlog and NumPy, typed, Python 3.12+.

pip install fuzcolor
import matplotlib.pyplot as plt
import fuzcolor as fc
from fuzcolor.models import COLIBRI

image = plt.imread("knight.jpg")  # docs/img/knight.jpg: 605 x 368 pixels, 8-bit RGB

print(COLIBRI)  # Model('COLIBRI', HSI: 81 chromatic, 5 achromatic)
print(COLIBRI.label([200, 30, 30]))  # red/high/dark
roof, cloud, grass = image[330, 320], image[150, 110], image[560, 200]
print(COLIBRI.label(roof))  # orange/medium/medium
print(COLIBRI.label(cloud))  # light blue/low/light
print(COLIBRI.label(grass))  # green/high/dark

weights = fc.palette(COLIBRI, image)  # the share of the image in each of 86 colors
fc.pie(COLIBRI, weights)

A picture, the color COLIBRI gives every pixel, and the palette of the picture

Inside

Models Model names colors as combinations of the terms of fuzlog variables
Spaces Space describes the channels of a color space; HSI comes with the library
Features palette describes an image, tabulate works a model out for every 8-bit color, plot, swatches and pie draw
fuzcolor.models the models that come with the library: COLIBRI
fuzcolor.math the color conversions as plain NumPy functions

Documentation

  • Guide: how to use a model and how to build one
  • COLIBRI: the model, its colors and its parameters
  • Reference: every public name on one page

Development

uv sync                 # environment with the dev tools
uv run pytest           # tests, including every example in the documentation
uv run ruff check       # lint; `uv run ruff format` formats
uv run ty check         # types

MIT license.

Metadata

Release files for fuzcolor 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fuzcolor 0.1.2
File Size Uploaded Provenance Actions
fuzcolor-0.1.2.tar.gz 14.2 kB Without provenance Details for fuzcolor-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fuzcolor 0.1.2
File Interpreter ABI Platform Actions
fuzcolor-0.1.2-py3-none-any.whl Python 3 none any Details for fuzcolor-0.1.2-py3-none-any.whl

Total release size: 31.5 kB

Release files / fuzcolor-0.1.2.tar.gz

Download URL fuzcolor-0.1.2.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0ac49bf3224694cdc4ad645a4c2750cafc5f9cdac724c4aaccaac27b97093d9f
BLAKE2b-256 checksum
How to use checksums
219ccafe3eb42c91a4c13dafc445f4b659444f3d8717d29c1d6cfc6d3912adef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fuzcolor-0.1.2-py3-none-any.whl

Download URL fuzcolor-0.1.2-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0c16f40dcd1adde2b3f79dc1cc85ac5e1e6555220aae2194ea33375b53d2281
BLAKE2b-256 checksum
How to use checksums
142de172b7d21b5fa5f4281bac620397ec5c4149793e0d2d4893b087b0a89bd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for fuzcolor 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page