Skip to main content

deltae2000 implements an algorithm for perceptual distance between colours in pure Python.

Project description

deltae2000 is an implementation of the CIEDE2000 algorithm to calculate the perceptual distance between two colours. This is implemented in pure Python with the intention to run optimal on the PyPy interpreter.

See the Wikipedia article for more information on the distance calculation.

Example usage:

from deltae2000 import delta_e_cie2000
from colormath.color_conversions import convert_color
from colormath.color_objects import sRGBColor, LabColor

delta_e_cie2000(
    convert_color(sRGBColor(255, 0, 0, is_upscaled=True), LabColor),
    convert_color(sRGBColor(125, 255, 125, is_upscaled=True), LabColor)
)

This is based on the implementation from colormath which uses Numpy in the implementation. Use the colormath version if you are using the CPython interpreter.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deltae2000-1.0.0.tar.gz (1.6 kB view hashes)

Uploaded source

Built Distribution

deltae2000-1.0.0-py3-none-any.whl (2.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page