fix 16 color key index

This commit is contained in:
Gordon Shumway 2019-05-21 06:29:47 -04:00 committed by GitHub
parent a634a0be57
commit 4ea9d6466b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -384,7 +384,7 @@ class ASCII(callbacks.Plugin):
"""
pixel = tuple(pixel)
if self.colors == 16:
colors = list(self.ircColors.keys()[:15])
colors = list(self.ircColors.keys())[:15]
if pixel not in self.matches:
closest_colors = sorted(colors, key=lambda color: self.distance(color, self.rgb2lab(pixel), speed))
closest_color = closest_colors[0]