From e1439b4cd2a1f3c5950cedf54f73d330f97baca0 Mon Sep 17 00:00:00 2001 From: Will Date: Fri, 16 Jun 2023 21:13:04 -0400 Subject: [PATCH] fix broken random color generator --- docker-network-graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-network-graph.py b/docker-network-graph.py index b23ba80..7ddf0f4 100755 --- a/docker-network-graph.py +++ b/docker-network-graph.py @@ -64,7 +64,7 @@ def get_unique_color() -> str: i += 1 else: # Generate random color if we've already used the 12 preset ones - c = "#%06x".format(random.randint(0, 0xFFFFFF)) + c = '#'.join([f"{random.randint(0, 255):02x}" for _ in range(3)]) return c