Skip to content

Instantly share code, notes, and snippets.

@GeekBoySupreme
Last active December 7, 2020 03:43
Show Gist options
  • Save GeekBoySupreme/c0085e400dcac7fe5350c87813198a97 to your computer and use it in GitHub Desktop.
Save GeekBoySupreme/c0085e400dcac7fe5350c87813198a97 to your computer and use it in GitHub Desktop.

Color Contribution Graph

canvas

The Github contribution Graph can look a bit too green at times, especially if you're feeling green.
So here is a snippet of code πŸ’›πŸ”·πŸ”»

Light it up πŸ˜‹

function paint_contrib_graph_light() {
var canvas_space = document.getElementsByClassName('day');
var hues = [
'#d5d8db',
'#e8e8e8',
'#97f098',
'#82b4ff',
'#ffee96'
];
for (var i = 0; i < canvas_space.length; i++) {
var randomizer = Math.floor(Math.random() * 5) + 0;
var hue = hues[randomizer];
canvas_space[i].setAttribute('fill', hue);
}
}
setInterval(paint_contrib_graph_light, 150);
@saswatsamal
Copy link

great one!! πŸ˜‹

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment