GitHub Heat

Generate customizable GitHub contribution heatmaps with SVG rendering, dark mode, visual effects, and extensive styling options. Fully mobile-optimized.

Deployed at: gh-heat.anishroy.com

Quick Start

Replace username with any GitHub username:

https://gh-heat.anishroy.com/api/username/svghttps://gh-heat.anishroy.com/api/username/svg?theme=purple&darkMode=true

API Endpoints

SVG Image API

GET /api/[username]/svg

Returns an SVG image of the contribution graph. Supports extensive customization via query parameters.

JSON Data API

GET /api/[username]

Returns raw contribution data as JSON with total count, date range, and daily contributions.

Canvas Page (for iframes)

GET /[username]/canvas

HTML page optimized for iframe embedding with horizontal scrolling support.

Query Parameters

Colors & Themes

ParameterValuesDescription
themeaccent, green, blue, purple, redColor theme (default: green)
darkModetrue, falseEnable dark mode
colors5 hex codes (no #)Custom palette (comma-separated)
vyear (e.g., 2024)Filter by year

Visual Styling

ParameterValuesDescription
shapesquare, circleCell shape (default: square)
radiusnumberBorder radius in px (default: 2)
borderWidthnumberBorder width in px (default: 1)
borderColorhex or rgbaBorder color
shadowtrue, falseAdd drop shadow

Typography

ParameterValuesDescription
fontfont familyCustom font (default: system)
fontSizenumberFont size in px (default: 10)
fontWeight100-900Font weight (default: 400)
textColorhex colorLabel text color

Background & Layout

ParameterValuesDescription
bghex colorBackground color
transparenttrue, falseTransparent background
gradientfrom,to,directionBackground gradient (horizontal, vertical, diagonal)

Dimensions

ParameterValuesDescription
cellSizenumberCell size in px (default: 11)
cellGapnumberGap between cells in px (default: 2)
widthnumberTotal SVG width (auto if not set)
heightnumberTotal SVG height (auto if not set)
paddingnumberPadding in px (default: 10)
mobiletrue, falseApply mobile-optimized defaults

Labels & Legend

ParameterValuesDescription
showMonthLabelstrue, falseShow month labels (default: true)
showDayLabelstrue, falseShow day labels (default: true)
showLegendtrue, falseShow legend (default: true)
legendPostop, bottom, left, rightLegend position (default: bottom)

Visual Effects

ParameterValuesDescription
blurnumber (e.g., 0.5)Blur effect strength
brightnessnumber (e.g., 1.2)Brightness multiplier
saturatenumber (e.g., 1.5)Saturation multiplier

Usage Examples

Embedding in HTML

<img src="https://gh-heat.anishroy.com/api/username/svg" /><img src="https://gh-heat.anishroy.com/api/username/svg?theme=purple&darkMode=true" />

Embedding in Markdown

![GitHub Contributions](https://gh-heat.anishroy.com/api/username/svg?theme=accent)

Embedding in iframe

<iframe src="https://gh-heat.anishroy.com/username/canvas?theme=accent" width="800" height="200"></iframe>

Example Configurations

Dark Mode with Purple Theme

?theme=purple&darkMode=true
Dark mode purple theme

Circular Cells with Shadow

?shape=circle&shadow=true&theme=green
Circular cells

Mobile Optimized

?mobile=true&theme=accent
Mobile optimized

Transparent Background

?transparent=true&theme=blue
Transparent background

Compact View (No Labels)

?showMonthLabels=false&showDayLabels=false&showLegend=false&padding=5
Compact view

Custom Colors

?colors=ffe4e6,fecdd3,fb7185,e11d48,9f1239
Custom colors

Large Cells with Custom Styling

?cellSize=15&cellGap=4&borderWidth=2&radius=6
Large cells

Tips & Best Practices

Available Themes

All themes support both light and dark modes via darkMode=true:

Or create custom 5-color palettes with the colors parameter (5 hex codes representing intensity levels 0-4)

Built with Next.js 15, TypeScript, and Cheerio. Data fetched from GitHub contribution calendar.

Created by Anish Roy