Install & Compatibility
Where this runs
tested against v1.3.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.328s · 89.5MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.6s · import 0.342s · 86MB
89MB installed
● package 89MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
get_colors
✓ from distinctipy import get_colors
✗ from distinctipy.distinctipy import get_colors
submodule not exposed
color_swatch
✓ from distinctipy import color_swatch
✗ import distinctipy; distinctipy.color_swatch()
module-level import works but less idiomatic
Generate 15 distinct colors and display their swatches.
from distinctipy import get_colors, color_swatch
n = 15
colors = get_colors(n)
print(colors[:3])
color_swatch(colors)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'distinctipy'
Library not installed or installed in wrong environment.
fixpip install distinctipy
AttributeError: module 'distinctipy' has no attribute 'color_swatch'
color_swatch was added in v1.2.0; older version or incorrect import.
fixUpgrade: pip install --upgrade distinctipy. Then use: from distinctipy import color_swatch
Upgrade
Version history
1.3.4latest on PyPI · released Jan 10, 2024
Audit
Dependencies
matplotliboptionalUsed for color swatch visualization and internal color space conversion
colorspaciousoptionalUsed for color distance calculations in CAM02-UCS color space