Skip to content

Commit

Permalink
feat: Expand color palette and dynamically calculate color index
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Nov 30, 2024
1 parent b93a461 commit 4f511e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hugo-site/static/html/eventual_convergence_viz.html
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ <h1 class="title">Freenet Eventual Convergence Simulation</h1>
// 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
Expand Down

0 comments on commit 4f511e2

Please sign in to comment.