diff --git a/py/pallete_schema.py b/py/pallete_schema.py index 850fbea..7c1260f 100644 --- a/py/pallete_schema.py +++ b/py/pallete_schema.py @@ -45,11 +45,12 @@ class PalleteSchema : def closest (self, comparison, space = 'BGR', pallete = None) : p = pallete if pallete is not None else self.pallete - colors = normalize_colors(space, ) + colors = normalize_colors(space, p) def normalize_colors (self, space = 'BGR', pallete = None) : colors = [] - for color in pallete : + p = pallete if pallete is not None else self.pallete + for color in p : colors.append(convert_color(color['color'], color['space'], space)) return colors