---
version: alpha
name: GitHub
description: Developer platform (Primer). Compact 14px interface, cool greys, 6px corners, green for the primary action and blue for links.
colors:
  primary: "#1F883D"
  on-primary: "#FFFFFF"
  primary-hover: "#1C8139"
  primary-active: "#197935"
  light:
    canvas: "#FFFFFF"
    canvas-muted: "#F6F8FA"
    ink: "#1F2328"
    ink-muted: "#59636E"
    border: "#D1D9E0"
    accent: "#0969DA"
    success: "#1A7F37"
    attention: "#9A6700"
    danger: "#D1242F"
    danger-emphasis: "#CF222E"
    done: "#8250DF"
    control-hover: "#EFF2F5"
    control-active: "#E6EAEF"
    bg-disabled: "#EFF2F5"
    ink-disabled: "#818B98"
    primary-disabled: "#95D8A6"
    on-primary-disabled: "#FFFFFFCC"
  dark:
    canvas: "#0D1117"
    canvas-muted: "#151B23"
    canvas-inset: "#010409"
    ink: "#F0F6FC"
    ink-muted: "#9198A1"
    border: "#3D444D"
    accent: "#4493F8"
    accent-emphasis: "#1F6FEB"
    primary: "#238636"
    primary-hover: "#29903B"
    control-hover: "#262C36"
    bg-disabled: "#212830"
    ink-disabled: "#656C76"
    primary-disabled: "#105823"
    on-primary-disabled: "#FFFFFF66"
    success: "#3FB950"
    attention: "#D29922"
    danger: "#F85149"
    danger-emphasis: "#DA3633"
    done: "#AB7DF8"
typography:
  title-lg:
    fontFamily: Mona Sans
    fontSize: 32px
    fontWeight: 600
    lineHeight: 1.5
  title-md:
    fontFamily: Mona Sans
    fontSize: 20px
    fontWeight: 600
    lineHeight: 1.6
  title-sm:
    fontFamily: Mona Sans
    fontSize: 16px
    fontWeight: 600
    lineHeight: 1.5
  body-lg:
    fontFamily: Mona Sans
    fontSize: 16px
    fontWeight: 400
    lineHeight: 1.5
  body-md:
    fontFamily: Mona Sans
    fontSize: 14px
    fontWeight: 400
    lineHeight: 1.43
  body-sm:
    fontFamily: Mona Sans
    fontSize: 12px
    fontWeight: 400
    lineHeight: 1.67
  label-md:
    fontFamily: Mona Sans
    fontSize: 14px
    fontWeight: 500
    lineHeight: 1.43
  caption:
    fontFamily: Mona Sans
    fontSize: 12px
    fontWeight: 400
    lineHeight: 1.33
  code:
    fontFamily: ui-monospace
    fontSize: 12px
    fontWeight: 400
    lineHeight: 1.67
rounded:
  sm: 3px
  md: 6px
  lg: 12px
  full: 9999px
spacing:
  xs: 4px
  sm: 8px
  md: 16px
  lg: 24px
  xl: 32px
  2xl: 40px
  control-sm: 28px
  control-md: 32px
  control-lg: 40px
  container: 1280px
components:
  button-primary:
    backgroundColor: "{colors.primary}"
    textColor: "{colors.on-primary}"
    typography: "{typography.label-md}"
    rounded: "{rounded.md}"
    height: 32px
    padding: 12px
  button-default:
    backgroundColor: "{colors.light.canvas-muted}"
    textColor: "{colors.light.ink}"
    typography: "{typography.label-md}"
    rounded: "{rounded.md}"
    height: 32px
    padding: 12px
  button-danger:
    backgroundColor: "{colors.light.canvas-muted}"
    textColor: "{colors.light.danger}"
    rounded: "{rounded.md}"
    height: 32px
    padding: 12px
  text-input:
    backgroundColor: "{colors.light.canvas}"
    textColor: "{colors.light.ink}"
    typography: "{typography.body-md}"
    rounded: "{rounded.md}"
    height: 32px
    padding: 12px
  box:
    backgroundColor: "{colors.light.canvas}"
    textColor: "{colors.light.ink}"
    rounded: "{rounded.md}"
    padding: 16px
  box-header:
    backgroundColor: "{colors.light.canvas-muted}"
    textColor: "{colors.light.ink}"
    typography: "{typography.title-sm}"
    padding: 16px
  label:
    textColor: "{colors.light.ink-muted}"
    typography: "{typography.caption}"
    rounded: "{rounded.full}"
    padding: 8px
  button-primary-hover:
    backgroundColor: "{colors.primary-hover}"
  button-default-hover:
    backgroundColor: "{colors.light.control-hover}"
---

# GitHub

## Overview

GitHub's product interface is a working tool used for hours at a time, and Primer is tuned for that: compact, legible and predictable. Base text is 14px, controls are 32px tall, corners are 6px, and almost every container is a white box with a 1px cool-grey border. Colour is functional. Green means "do the main thing", blue means "this is a link", and the status colours map to the state of code: open, merged, closed, pending.

The feeling is utilitarian and trustworthy. Density matters more than drama.

## Colors

Light and dark are both first-class, with dark built on a deep blue-black rather than neutral grey.

- **Primary (#1F883D light, #238636 dark):** The one green button per view: Sign in, Create, Merge.
- **Accent (#0969DA light, #4493F8 dark):** Links, focus outlines, selected tabs.
- **Canvas (#FFFFFF / #0D1117) and Canvas muted (#F6F8FA / #151B23):** Page and subtle fills: default buttons, box headers, footers, code blocks.
- **Ink (#1F2328 / #F0F6FC) and Ink muted (#59636E / #9198A1):** Text and secondary text.
- **Border (#D1D9E0 / #3D444D):** Every box, input and divider.
- **Success, Attention, Danger, Done:** Open, pending, closed and merged. Used on icons, counters and state labels, not on large surfaces.

## Typography

Mona Sans leads the font stack, followed by the system UI font. Sizes are small and fixed: 14px for body and controls, 12px for metadata, 16–32px for titles. Weight does the hierarchy work: 600 for titles and names, 500 for buttons, 400 for everything else. Code uses the system monospace at 12px.

## Layout

A 1280px container, usually split into a main column and a 296px sidebar. Spacing is a 4px base with 8, 16 and 24 as the working steps. Lists are rows inside a single bordered box, divided by hairlines. Forms are narrow and left-aligned.

## Elevation & Depth

Flat by default: borders define structure. Shadows exist only for overlays such as menus and dialogs, where a soft multi-layer shadow lifts the surface above the page.

## Shapes

A single 6px radius for buttons, inputs and boxes. 12px for dialogs and large overlays, 3px for tiny elements, and full pills for labels and counters.

## Components

- **Primary button:** Green fill, white 14px medium label, 6px radius, 32px tall (40px on sign-in screens).
- **Default button:** Canvas-muted fill, 1px border, Ink label. The most common button.
- **Danger button:** Default button with red label; fills red on hover.
- **Input:** White, 1px border, 6px radius, 32px tall; blue border and 2px outline on focus. Label sits above in 14px semibold.
- **Box:** White container, 1px border, 6px radius; an optional muted header row carries a 16px semibold title.
- **Label:** Pill with 1px border and 12px medium text; state labels are filled with the state colour.
- **States:** The green button darkens to #1C8139 on hover and #197935 when pressed (#29903B on hover in dark). Default buttons step from #F6F8FA to #EFF2F5 to #E6EAEF. Keyboard focus is a 2px outline in the accent blue, drawn 2px inside the control. Disabled controls use fixed colours, not opacity: #818B98 text on #EFF2F5 for default buttons, and a pale green (#95D8A6) with 80% white text for the primary button. The theme carries these as rules.

## Do's and Don'ts

- Do keep one green button per view.
- Do put a 1px border on every container; structure comes from lines.
- Do stay at 14px for interface text.
- Don't round anything more than 6px except dialogs and pills.
- Don't use the status colours as decoration.
- Don't add shadows to boxes in the page flow.

## Known Gaps

- Colour, radius and control-size values are GitHub's published Primer primitives (npm `@primer/primitives` 11.10.0).
- Cross-checked twice on 2026-11-19: light values against pixels of github.com/login, and dark values, the 6px radius, the 40px auth-screen button and the 14px/500 button label against computed styles in a signed-in browser. Everything matched.
- The type scale is Primer's functional scale; line heights are converted to unitless ratios.
- The marketing site (dark, large display type) is not described; this file covers the product interface.
- Hover, pressed, disabled and focus values are Primer's published tokens. The inset focus outline (offset -2px) follows Primer's convention and was not re-measured.
