Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.2 KB

File metadata and controls

26 lines (18 loc) · 1.2 KB

GitHub Graph Fixer

A Chrome extension that modifies the GitHub contribution graph to use a logarithmic color scale.

Why?

GitHub's default scaling is often linear or poorly handled when you have significant outliers. If you have 364 days with 5 commits and one "peak" day with 100 commits, the 5-commit days will appear almost empty.

This extension fixes that by ensuring days with similar activity levels share similar colors, even if they aren't near the absolute maximum.

The Algorithm

Instead of a linear mapping, we use a logarithmic ratio:

$$level = \lceil \frac{\log(count + 1)}{\log(max+1)} \times 4 \rceil$$

  • Count: Number of contributions for a specific day.
  • Max: The highest contribution count found in the current graph.
  • Level: The resulting color shade (0 to 4).

This maps the counts to levels 1-4 more aggressively at lower ranges and groups high-activity days together, preventing outliers from "washing out" the rest of your graph.

Installation

  1. Download or clone this repository.
  2. Open Chrome and go to chrome://extensions.
  3. Enable Developer mode (top right).
  4. Click Load unpacked and select this project folder.
  5. Refresh your GitHub profile page.