Skip to content

Commit

Permalink
Better heatmap colors
Browse files Browse the repository at this point in the history
  • Loading branch information
EliaFantini committed Jun 4, 2023
1 parent 2d845e8 commit 4fad4bd
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions website/js/heatmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,16 @@ function updateHeatmapChart(data) {
.select(".domain").remove()

const palettes = {
1: ['#0061ff', '#60efff'],
2: ['#40c9ff', '#e81cff'],
3: ['#ff930f', '#fff95b'],
4: ['#696eff', '#f8acff'],
5: ['#006e90', '#f18f01'],
6: ['#0a2463', '#fb3640'],
7: ['#57ebde', '#aefb2a'],
8: ['#ef798a', '#f7a9a8'],
9: ['#00ffff', '#8000ff'],
10: ['#ffc7f8', '#6bf8fa'],
1: ['#ff0f7b', '#0061ff'],
2: ['#42047e', '#103783'],
3: ['#ff5400', '#d62828'],
4: ['#1dbde6', '#001a70'],
5: ['#ff4000', '#f18805'],
6: ['#008751', '#b0db43'],
};

// choose a random color palette for the nodes
const palette = palettes[Math.floor(Math.random() * 10) + 1];
const palette = palettes[Math.floor(Math.random() * 6) + 1];
// palette is an array of hex colors, pick one at random
const hexColor = palette[Math.floor(Math.random() * palette.length)];

Expand Down

0 comments on commit 4fad4bd

Please sign in to comment.