Skip to content

Instantly share code, notes, and snippets.

View camillef's full-sized avatar

Camille Fenton camillef

View GitHub Profile
@noeldelgado
noeldelgado / github-graph-colours-changer.js
Last active March 8, 2020 23:05
Copy and paste the code on your github profile page to change the graph colours... (DevTools » Console)
// var GH = ['#EEEEEE', '#D6E685', '#8CC665', '#44A340', '#1E6823']; /* previous GH colors */
var GH = ['#EBEDF0', '#C6E48B', '#7BC96F', '#239A3B', '#196127'];
var CO = ['#EF4B4D', '#F89B47', '#FAEA20', '#7DC242', '#5D94CE', '#855CA7'];
var graph = document.getElementsByClassName('js-calendar-graph-svg')[0];
var days = [].slice.call(graph.getElementsByTagName('rect'), 0);
days.forEach(function(rect) {
switch(rect.getAttribute('fill').toUpperCase()) {
case GH[0]: rect.setAttribute('fill', CO[2]); break; // yellow