This commit is contained in:
vegu-ai-tools
2025-11-20 11:51:41 +02:00
parent e632f2bff6
commit ac3e569324

View File

@@ -83,17 +83,17 @@ def random_color() -> str:
def unique_random_colors(count: int) -> list[str]:
"""Return a list of unique random colors.
Args:
count: Number of unique colors to return
Returns:
List of color hex codes. If count exceeds available colors,
duplicates may be included but colors are still randomized.
"""
if count <= 0:
return []
if count > len(COLORS):
# If we have more requested colors than available, allow duplicates but still randomize
return [random.choice(COLORS) for _ in range(count)]