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 numpy as np
import fuzcolor as fc
from fuzcolor.models import COLIBRI

image = np.array(
    [[[200, 30, 30], [250, 220, 40]], [[30, 60, 200], [60, 60, 60]]], dtype=np.uint8
)

print(COLIBRI)  # Model('COLIBRI', HSI: 81 chromatic, 5 achromatic)
print(COLIBRI.label([200, 30, 30]))  # red/high/dark
print(COLIBRI.label(image).tolist())
# [['red/high/dark', 'yellow/high/light'], ['blue/high/medium', 'dark gray']]

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

An image, the color of every pixel and the palette of the image

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.0

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.0
File Size Uploaded Provenance Actions
fuzcolor-0.1.0.tar.gz 12.2 kB Without provenance Details for fuzcolor-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 27.4 kB

Release files / fuzcolor-0.1.0.tar.gz

Download URL fuzcolor-0.1.0.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ecd238c62baddd4d8327f74f959796a1724a224c5e514393026108208f3e26d3
BLAKE2b-256 checksum
How to use checksums
9b10e14ba300a00e3d75a42f0a682b11446afff603ba41ade496db0c027bf2fe
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.0-py3-none-any.whl

Download URL fuzcolor-0.1.0-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ccb02c4c32d6784e4d931f043c81d2f0fe5da56cd2ecc982f4cf107312013494
BLAKE2b-256 checksum
How to use checksums
9e7b861dda542f9895f655e214fc147825fce2cb2ab3bc054da8a08312ccb852
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.0

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