#0D1117
#58A6FF
#21262D
#C9D1D9
Background
Primary Accent
Secondary
Body Text

GitHub Color Palette

#0D1117 · #58A6FF · #21262D · #C9D1D9

AAA
WCAG Grade
12.3:1
Contrast Ratio
4,600
Saves
12,400
AI Copies
AI Prompt

Use #0D1117 as the background. Use #58A6FF as the primary accent. Use #21262D as secondary. Use #C9D1D9 as body text/supporting color. Palette mood: GitHub — night, cool, minimal.

Hex Codes, RGB & CMYK Color Values

Technical breakdown for the GitHub color scheme. Use these values for web design (HEX/RGB), print projects (CMYK), or specialized design software (HSL).

Swatch Design Role HEX RGB CMYK HSL
Background
Luminance: 0.5%
13, 17, 23 43%, 26%, 0%, 91% 216°, 28%, 7%
Primary Accent
Luminance: 36.6%
88, 166, 255 65%, 35%, 0%, 0% 212°, 100%, 67%
Secondary
Luminance: 1.9%
33, 38, 45 27%, 16%, 0%, 82% 215°, 15%, 15%
Body Text
Luminance: 63.0%
201, 209, 217 7%, 4%, 0%, 15% 210°, 17%, 82%

GitHub Tints & Shades

Hover states, borders and elevation need lighter and darker steps of your base colors. Here are computed tints and shades for every color in the GitHub palette — click any swatch to copy its hex.

#0D1117 gently saturated blue
#58A6FF saturated cyan-blue
#21262D muted cyan-blue
#C9D1D9 muted cyan-blue

GitHub Palette Contrast Matrix (WCAG 2.1)

Every color tested as text on every other color as background. Body copy needs 4.5:1 (AA), large text and UI components 3:1. AAA requires 7:1.

Text on Background Preview Ratio Grade Safe For
#C9D1D9 on #0D1117
Aa Sample Text
12.26:1 AAA Body text, headings, UI
#0D1117 on #C9D1D9
Aa Sample Text
12.26:1 AAA Body text, headings, UI
#C9D1D9 on #21262D
Aa Sample Text
9.86:1 AAA Body text, headings, UI
#21262D on #C9D1D9
Aa Sample Text
9.86:1 AAA Body text, headings, UI
#58A6FF on #0D1117
Aa Sample Text
7.49:1 AAA Body text, headings, UI
#0D1117 on #58A6FF
Aa Sample Text
7.49:1 AAA Body text, headings, UI
#21262D on #58A6FF
Aa Sample Text
6.03:1 AA Body text, UI
#58A6FF on #21262D
Aa Sample Text
6.03:1 AA Body text, UI
#C9D1D9 on #58A6FF
Aa Sample Text
1.64:1 Fail Decorative use only
#58A6FF on #C9D1D9
Aa Sample Text
1.64:1 Fail Decorative use only
#21262D on #0D1117
Aa Sample Text
1.24:1 Fail Decorative use only
#0D1117 on #21262D
Aa Sample Text
1.24:1 Fail Decorative use only

GitHub Color Psychology & Meaning

GitHub dark is where code lives. The near-black background mimics the terminal experience that developers love. The electric blue is a cursor in the dark.

Color Harmony: Analogous Scheme

The GitHub palette is built using a analogous relationship between its hues. This ensures that even with high-contrast accents, the overall scheme feels balanced and intentional.

Hue Wheel

A analogous palette is often preferred by professional designers because it creates a calm, serene atmosphere by using neighboring colors.

History & Design Context

GitHub launched 2008. The dark mode palette, launched 2020, was the most-requested feature in GitHub history. The developer community's preference for dark interfaces shaped this.

Best Design Use Cases

Deep dark background always for code contexts. Electric blue for links, branch indicators, and interactive elements. Keep gray for secondary metadata.

Industries This Palette Suits

Developer tools, version control, open source, technical platforms.

Colors That Pair Well With GitHub

Need a fifth color? These three companions are computed from the palette's own hue positions on the color wheel, so they extend the scheme without breaking its harmony.

orange

directly opposite #58A6FF on the wheel — the strongest accent for CTAs and highlights when you need maximum energy

blue

30° beside #58A6FF — a calm secondary that extends the palette without adding tension

tinted neutral

a paper-white carrying the palette's own hue — perfect for surfaces and dividers

Using GitHub Without Breaking Accessibility

  • Use #58A6FF for buttons and links — it scores 7.5:1 against the #0D1117 background (above the 3:1 UI-components threshold).
  • Set body text in #C9D1D9 — 12.3:1 against #0D1117 passes WCAG AA (AAA) for long-form reading.
  • Let #21262D carry sidebars, cards and footers — at a deep lightness it separates zones without stealing focus from #58A6FF.

How to Implement the GitHub Color Scheme

To use this GitHub color palette in your web project, you can copy the following CSS variables or Tailwind CSS configuration. These roles ensure your UI maintains accessibility and visual hierarchy.

Option 1: CSS Variables

:root { 
  /* {name} Palette - ihatecolors.com */{'
'}  --color-bg: {colors[0]};{'
'}  --color-primary: {colors[1]};{'
'}  --color-secondary: {colors[2]};{'
'}  --color-text: {colors[3]};{'
'} {'}'}

Web Design Tip

Use #0D1117 for the main background and #58A6FF for primary buttons. This creates a high-contrast focal point.

Accessibility Note

The contrast ratio between #C9D1D9 and #0D1117 is 12.26:1 (AAA). Ensure your body text remains legible.

GitHub Palette — Frequently Asked Questions

What are the hex codes in the GitHub color palette?

The GitHub palette contains #0D1117, #58A6FF, #21262D, #C9D1D9. Click any swatch on this page to copy its value, or export all four at once as CSS variables, Tailwind config, SCSS or a Figma-ready list.

Is the GitHub color palette accessible (WCAG)?

Yes for its strongest pairings: #C9D1D9 on #0D1117 reaches 12.3:1 (AAA). For body text always keep a 4.5:1 ratio and for large UI elements 3:1 — the full contrast matrix above shows the exact score for every color-on-color combination in this palette.

What colors go well with the GitHub palette?

Beyond its own four colors, #FFB057, #645FF7, #ECEDEE extend it naturally: the complementary hue for high-energy accents, an analogous neighbor for calm transitions, and a tinted neutral for surfaces. All three are computed from this palette's hues on the color wheel.

What mood does the GitHub palette create?

GitHub reads as night, cool, minimal. Saturated cyan-blue drives the personality, grounded by gently saturated blue — a combination that works best when the deep base gets most of the canvas.

Can I use the GitHub color palette commercially?

Yes. Individual color values can't be copyrighted, so the GitHub palette is free for personal, client and commercial work — websites, branding, apps, print and social content, with no attribution required.

How do I add the GitHub palette to Tailwind or CSS?

Use the export panel on this page: CSS variables, a Tailwind config block, SCSS variables, or a Figma copy list are generated from GitHub's exact values, including the tint and shade ramps shown above.

Similar Palettes

Live Preview
Generate Similar ✦
Skip to content