From 4f511e20d13731d8f4fc4ce22879d6ec63c26f85 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Sat, 30 Nov 2024 10:49:36 -0500 Subject: [PATCH] feat: Expand color palette and dynamically calculate color index --- hugo-site/static/html/eventual_convergence_viz.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hugo-site/static/html/eventual_convergence_viz.html b/hugo-site/static/html/eventual_convergence_viz.html index 0b173659..42996698 100644 --- a/hugo-site/static/html/eventual_convergence_viz.html +++ b/hugo-site/static/html/eventual_convergence_viz.html @@ -236,9 +236,9 @@

Freenet Eventual Convergence Simulation

// Clean up any undefined colors first startNode.data.receivedColors = startNode.data.receivedColors.filter(color => color !== undefined); - // Rotate through colors sequentially - lastColorIndex = (lastColorIndex + 1) % 3; - const distinctColors = ["#4a90e2", "#ff7f50", "#32cd32"]; + // Define distinct colors and rotate through them sequentially + const distinctColors = ["#4a90e2", "#ff7f50", "#32cd32", "#9370db", "#ff69b4", "#ffd700"]; + lastColorIndex = (lastColorIndex + 1) % distinctColors.length; const newColor = distinctColors[lastColorIndex]; // Add new color to global tracking