Colour reference
GitHub Dark
#0d1117
GitHub’s dark mode canvas colour.
- RGB
- rgb(13 17 23)
- HSL
- 216°, 28%, 7%
- OKLCh
- 17.6% 0.014 258.4
GitHub Dark in every format
Web & CSSThe everyday formats for stylesheets and design tools.
| Hex | #0d1117 | |
|---|---|---|
| RGB | rgb(13 17 23) | |
| RGB legacy | rgb(13, 17, 23) | |
| RGB percent | rgb(5.1% 6.67% 9.02%) | |
| HSL | hsl(216 27.8% 7.1%) | |
| HSL legacy | hsl(216, 27.8%, 7.1%) | |
| HSV / HSB | hsv(216, 43.5%, 9%) | |
| HWB | hwb(216 5.1% 91%) | |
| Nearest name | midnightblue (approx.) | |
| CMYK | cmyk(43.5%, 26.1%, 0%, 91%)Naive conversion. Real print work needs an ICC profile. |
Perceptual & wide gamutModern CSS colour spaces for uniform scales and P3 displays.
| OKLCh | oklch(17.628% 0.01402 258.357)Modern CSS colour space for even palettes — better than HSL when building scales. | |
|---|---|---|
| OKLab | oklab(17.628% -0.00283 -0.01373) | |
| CIE LCh | lch(4.908% 4.239 264.565) | |
| CIE Lab | lab(4.908% -0.401 -4.22) | |
| Display P3 | color(display-p3 0.054 0.0662 0.0881) | |
| Rec. 2020 | color(rec2020 0.0213 0.0249 0.037) | |
| srgb-linear | color(srgb-linear 0.004 0.0056 0.0086)Light-linear sRGB — the same numbers a shader wants for maths. | |
| CIE XYZ (D65) | color(xyz-d65 0.0052 0.0055 0.0089) |
ShadersGLSL, HLSL and WGSL vectors in both encoded and linear form.
| GLSL vec3 — sRGB | vec3(0.051, 0.067, 0.09)Encoded values. Use when writing straight to the framebuffer. | |
|---|---|---|
| GLSL vec3 — linear | vec3(0.004, 0.006, 0.009)Light-linear values. Use for lighting, blending and mixing. | |
| GLSL vec4 — sRGB | vec4(0.051, 0.067, 0.09, 1.0) | |
| GLSL vec4 — linear | vec4(0.004, 0.006, 0.009, 1.0) | |
| GLSL ivec3 | ivec3(13, 17, 23) | |
| HLSL float3 — sRGB | float3(0.051, 0.067, 0.09) | |
| HLSL float3 — linear | float3(0.004, 0.006, 0.009) | |
| HLSL float4 — sRGB | float4(0.051, 0.067, 0.09, 1.0) | |
| HLSL half4 — sRGB | half4(0.051, 0.067, 0.09, 1.0) | |
| WGSL vec3f — sRGB | vec3f(0.051, 0.067, 0.09) | |
| WGSL vec4f — sRGB | vec4f(0.051, 0.067, 0.09, 1.0) | |
| WGSL vec3<f32> — linear | vec3<f32>(0.004, 0.006, 0.009) |
Engines & appsConstructors for Unity, Unreal, Godot, Flutter, SwiftUI and Android.
| Unity Color | new Color(0.051f, 0.067f, 0.09f, 1.0f)Color for everyday scripting (0–1). Color32 when you need whole numbers from 0 to 255. | |
|---|---|---|
| Unity Color32 | new Color32(13, 17, 23, 255) | |
| Unreal FLinearColor | FLinearColor(0.004f, 0.0056f, 0.0086f, 1.0f)FLinearColor for materials and lighting. FColor when you need whole numbers from 0 to 255. | |
| Unreal FColor | FColor(13, 17, 23, 255)Whole numbers from 0 to 255 — use when an API asks for FColor, not FLinearColor. | |
| Godot Color | Color(0.051, 0.067, 0.09, 1) | |
| Flutter Color | Color(0xFF0D1117)Packed ARGB, so alpha comes first. | |
| Android Color | Color.rgb(13, 17, 23) | |
| SwiftUI Color | Color(red: 0.051, green: 0.067, blue: 0.09) | |
| UIKit UIColor | UIColor(red: 0.051, green: 0.067, blue: 0.09, alpha: 1) |
Raw valuesPacked integers and plain arrays.
| 0x hex | 0x0D1117 | |
|---|---|---|
| 0x hex (ARGB) | 0xFF0D1117 | |
| Array 0–1 | [0.051, 0.067, 0.09] | |
| Array 0–255 | [13, 17, 23] | |
| Decimal integer | 856343 |
Contrast and accessibility
WCAG 2 ratios are what audits and legislation reference. APCA is shown alongside because WCAG 2 is known to misjudge mid-tone backgrounds, and it is the basis of the WCAG 3 draft.
| Pairing | WCAG 2 ratio | Level | APCA | Suitable for |
|---|---|---|---|---|
| GitHub Dark on white | 18.92:1 | AAA | Lc 105 | Body text at any size |
| GitHub Dark on black | 1.11:1 | Fail | Lc 0 | Not usable for text |
GitHub Dark text on a white background
GitHub Dark text on a black background
White text on GitHub Dark
Black text on GitHub Dark
Tonal scale
Hue held fixed while lightness walks OKLCh, ready to use as a design system ramp.
- 50#f3f8ff
- 100#e9eef5
- 200#d8dde4
- 300#c1c6ce
- 400#a4aab2
- 500#868c94
- 600#6d727a
- 700#565b62
- 800#44484e
- 900#34383e
- 950#1d1f24
Tints and shades
Mixed perceptually toward white and black, so the steps feel evenly spaced.
- Tint 1#2e3137
- Tint 2#52565b
- Tint 3#7a7d81
- Tint 4#a4a6a9
- Tint 5#d1d2d3
- Shade 1#080b0f
- Shade 2#040508
- Shade 3#020204
- Shade 4#000101
- Shade 5#000000
Colours that work with GitHub Dark
Complementary, triadic and analogous partners, rotated in OKLCh so they keep the same apparent brightness.
- #14100a
- #170e0e
- #0e120c
- #0a1216
- #101017
Closest CSS names
midnightblueΔEok 0.172blackΔEok 0.177navyΔEok 0.198darkblueΔEok 0.216darkslategrayΔEok 0.229indigoΔEok 0.235