From b317914922623b87715263d1854107c640b94d0e Mon Sep 17 00:00:00 2001 From: mattmcw Date: Tue, 21 Nov 2023 23:42:16 -0500 Subject: [PATCH] Was broken --- py/pallete_schema.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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