This repository has been archived by the owner on May 30, 2023. It is now read-only.
new python-colormath breaks colorific #17
Comments
Thanks for letting us know. Did it give you a stacktrace? |
Yep: >>> from PIL import Image
>>> from colorific import extract_colors
>>> palette = extract_colors(Image.open('/Users/mjf/Desktop/download.png'))
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-12-e7657c8c6f75> in <module>()
----> 1 palette = extract_colors(Image.open('/Users/mjf/Desktop/download.png'))
/Users/mjf/venv/twnkl.notebook/lib/python2.7/site-packages/colorific.pyc in extract_colors(filename_or_img, min_saturation, min_distance, max_colors, min_prominence, n_quantized)
141 aggregated[c] += n
142 else:
--> 143 d, nearest = min((distance(c, alt), alt) for alt in aggregated)
144 if d < min_distance:
145 # nearby match
/Users/mjf/venv/twnkl.notebook/lib/python2.7/site-packages/colorific.pyc in <genexpr>((alt,))
141 aggregated[c] += n
142 else:
--> 143 d, nearest = min((distance(c, alt), alt) for alt in aggregated)
144 if d < min_distance:
145 # nearby match
/Users/mjf/venv/twnkl.notebook/lib/python2.7/site-packages/colorific.pyc in distance(c1, c2)
102 def distance(c1, c2):
103 "Calculate the visual distance between the two colors."
--> 104 return RGBColor(*c1).delta_e(RGBColor(*c2), method='cmc')
105
106 def rgb_to_hex(color):
AttributeError: 'RGBColor' object has no attribute 'delta_e' |
I pinned colorific to a known good version of |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
They're doing some pretty major overhauls to python-colormath...
The text was updated successfully, but these errors were encountered: