Skip to content

Commit 5d59bf1

Browse files
committed
feat: add graphThemes for heatmap visualization with optimized color schemes
1 parent d55e1ce commit 5d59bf1

1 file changed

Lines changed: 89 additions & 0 deletions

File tree

src/utils/themes/graph.ts

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
import { Theme } from '../../types.js';
2+
3+
/**
4+
* Graph-optimized themes for the /graph activity heatmap.
5+
*
6+
* These themes are tuned so that `iconColor` (the heatmap cell fill) is vivid
7+
* and high-contrast against the near-black `bgColor`, making contribution
8+
* density immediately readable.
9+
*
10+
* Key colour roles in the graph:
11+
* titleColor → large heading text (username + year)
12+
* textColor → subtitle, month labels, legend labels
13+
* iconColor → heatmap cell fill (levels 1-4 derived from this)
14+
* bgColor → canvas background (should be very dark)
15+
* borderColor → background grid lines and divider
16+
*/
17+
export const graphThemes: { [key: string]: Theme } = {
18+
/** Emerald green — Northern Lights feel */
19+
aurora: {
20+
titleColor: '#a8ffce',
21+
textColor: '#c8ffd4',
22+
iconColor: '#00e676',
23+
bgColor: '#020c12',
24+
borderColor: '#0a3026',
25+
},
26+
27+
/** Pure terminal green on black — classic hacker aesthetic */
28+
matrix: {
29+
titleColor: '#00ff41',
30+
textColor: '#39ff14',
31+
iconColor: '#00cc33',
32+
bgColor: '#000000',
33+
borderColor: '#003300',
34+
},
35+
36+
/** Red-orange fire gradient — heat/intensity */
37+
inferno: {
38+
titleColor: '#ff9a00',
39+
textColor: '#ffcf77',
40+
iconColor: '#ff4500',
41+
bgColor: '#0d0200',
42+
borderColor: '#3d0a00',
43+
},
44+
45+
/** Deep cyan-blue water — calm and readable */
46+
ocean: {
47+
titleColor: '#00d4ff',
48+
textColor: '#b2f0ff',
49+
iconColor: '#0099cc',
50+
bgColor: '#020d1a',
51+
borderColor: '#0a2a40',
52+
},
53+
54+
/** Magenta / purple — cyberpunk neon */
55+
neon: {
56+
titleColor: '#ff00cc',
57+
textColor: '#ff99ee',
58+
iconColor: '#cc00ff',
59+
bgColor: '#0a000f',
60+
borderColor: '#3d0050',
61+
},
62+
63+
/** Amber / gold — warm solar glow */
64+
solar: {
65+
titleColor: '#ffd700',
66+
textColor: '#ffe88a',
67+
iconColor: '#f5a623',
68+
bgColor: '#0d0900',
69+
borderColor: '#3a2800',
70+
},
71+
72+
/** Violet / purple — deep-space galaxy */
73+
galaxy: {
74+
titleColor: '#c084fc',
75+
textColor: '#e9d5ff',
76+
iconColor: '#8b5cf6',
77+
bgColor: '#05020f',
78+
borderColor: '#1e0a40',
79+
},
80+
81+
/** GitHub native dark palette — green contribution cells */
82+
'github-dark': {
83+
titleColor: '#58a6ff',
84+
textColor: '#c9d1d9',
85+
iconColor: '#39d353',
86+
bgColor: '#0d1117',
87+
borderColor: '#21262d',
88+
},
89+
};

0 commit comments

Comments
 (0)