diff --git a/src/palettes/material_design.py b/src/palettes/material_design.py index 6ee10a3..5c0d1ed 100644 --- a/src/palettes/material_design.py +++ b/src/palettes/material_design.py @@ -59,7 +59,10 @@ def _define_named_colors(self): # The colors are already available as pal[0], pal[1], etc. # Now we want to add pal.BLACK = pal[0], pal.WHITE = pal[1], etc. color_index = 0 - for name, length in zip(FAMILIES, LENGTHS, strict=True): + if len(FAMILIES) != len(LENGTHS): + raise ValueError("FAMILIES and LENGTHS must have the same length") + for i, name in enumerate(FAMILIES): + length = LENGTHS[i] if length == 1: # black or white setattr(self, name.upper(), self[color_index]) color_index += 1