gtaylor / python-colormath

A python module that abstracts common color math operations. For example, converting from CIE L*a*b to XYZ, or from RGB to CMYK
python-colormath.readthedocs.org
BSD 3-Clause "New" or "Revised" License
456 stars 82 forks source link

Convert RGB to Lab NetworkXError #70

Closed lx1054331851 closed 7 years ago

lx1054331851 commented 7 years ago

when i convert RGB to LAB, an error occures: networkx.exception.NetworkXError: The node <class 'tuple'> is not in the digraph.

It's my code :

from colormath.color_objects import LabColor, sRGBColor, xyYColor
from colormath.color_conversions import convert_color
from colormath.color_diff import delta_e_cie1976

srgb = (227, 239, 236)

xyz = convert_color(srgb, xyYColor)
slab = convert_color(xyz, LabColor)