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 color not working #77

Closed marcin-derlukiewicz closed 6 years ago

marcin-derlukiewicz commented 6 years ago
$ python -i
Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from colormath.color_conversions import convert_color
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/colormath/color_conversions.py", line 167, in <module>
    def Spectral_to_XYZ(cobj, illuminant_override=None, *args, **kwargs):
  File "/usr/local/lib/python2.7/dist-packages/colormath/color_conversions.py", line 159, in decorator
    _conversion_manager.add_type_conversion(start_type, target_type, f)
  File "/usr/local/lib/python2.7/dist-packages/colormath/color_conversions.py", line 125, in add_type_conversion
    self.conversion_graph.add_edge(start_type, target_type, {'conversion_function': conversion_function})
TypeError: add_edge() takes exactly 3 arguments (4 given)
gtaylor commented 6 years ago

Fixed in #73.