diff --git a/conntrackt/utils.py b/conntrackt/utils.py --- a/conntrackt/utils.py +++ b/conntrackt/utils.py @@ -104,6 +104,12 @@ def get_distinct_colors(count, start=pal List of distinct palette.Color instances. """ + # If zero is passed as count, return empty list. + if count == 0: + return [] + elif count < 0: + raise ValueError("Count must be a non-negative integer value.") + # Read the HSL from provided Color. hue, sat, lum = start.hsl["h"], start.hsl["s"], start.hsl["l"]