CSS named colour
Midnight Blue
#191970
A CSS named colour: midnightblue is valid anywhere a colour is expected.
- RGB
- rgb(25 25 112)
- HSL
- 240°, 64%, 27%
- OKLCh
- 28.8% 0.144 272.8
Midnight Blue in every format
Web & CSSThe everyday formats for stylesheets and design tools.
| Hex | #191970 | |
|---|---|---|
| RGB | rgb(25 25 112) | |
| RGB legacy | rgb(25, 25, 112) | |
| RGB percent | rgb(9.8% 9.8% 43.92%) | |
| HSL | hsl(240 63.5% 26.9%) | |
| HSL legacy | hsl(240, 63.5%, 26.9%) | |
| HSV / HSB | hsv(240, 77.7%, 43.9%) | |
| HWB | hwb(240 9.8% 56.1%) | |
| Nearest name | midnightblue | |
| CMYK | cmyk(77.7%, 77.7%, 0%, 56.1%)Naive conversion. Real print work needs an ICC profile. |
Perceptual & wide gamutModern CSS colour spaces for uniform scales and P3 displays.
| OKLCh | oklch(28.812% 0.14363 272.765)Modern CSS colour space for even palettes — better than HSL when building scales. | |
|---|---|---|
| OKLab | oklab(28.812% 0.00693 -0.14346) | |
| CIE LCh | lch(14.929% 57.139 297.016) | |
| CIE Lab | lab(14.929% 25.955 -50.904) | |
| Display P3 | color(display-p3 0.098 0.098 0.4215) | |
| Rec. 2020 | color(rec2020 0.0734 0.0515 0.3633) | |
| srgb-linear | color(srgb-linear 0.0097 0.0097 0.162)Light-linear sRGB — the same numbers a shader wants for maths. | |
| CIE XYZ (D65) | color(xyz-d65 0.0367 0.0207 0.1554) |
ShadersGLSL, HLSL and WGSL vectors in both encoded and linear form.
| GLSL vec3 — sRGB | vec3(0.098, 0.098, 0.439)Encoded values. Use when writing straight to the framebuffer. | |
|---|---|---|
| GLSL vec3 — linear | vec3(0.01, 0.01, 0.162)Light-linear values. Use for lighting, blending and mixing. | |
| GLSL vec4 — sRGB | vec4(0.098, 0.098, 0.439, 1.0) | |
| GLSL vec4 — linear | vec4(0.01, 0.01, 0.162, 1.0) | |
| GLSL ivec3 | ivec3(25, 25, 112) | |
| HLSL float3 — sRGB | float3(0.098, 0.098, 0.439) | |
| HLSL float3 — linear | float3(0.01, 0.01, 0.162) | |
| HLSL float4 — sRGB | float4(0.098, 0.098, 0.439, 1.0) | |
| HLSL half4 — sRGB | half4(0.098, 0.098, 0.439, 1.0) | |
| WGSL vec3f — sRGB | vec3f(0.098, 0.098, 0.439) | |
| WGSL vec4f — sRGB | vec4f(0.098, 0.098, 0.439, 1.0) | |
| WGSL vec3<f32> — linear | vec3<f32>(0.01, 0.01, 0.162) |
Engines & appsConstructors for Unity, Unreal, Godot, Flutter, SwiftUI and Android.
| Unity Color | new Color(0.098f, 0.098f, 0.439f, 1.0f)Color for everyday scripting (0–1). Color32 when you need whole numbers from 0 to 255. | |
|---|---|---|
| Unity Color32 | new Color32(25, 25, 112, 255) | |
| Unreal FLinearColor | FLinearColor(0.0097f, 0.0097f, 0.162f, 1.0f)FLinearColor for materials and lighting. FColor when you need whole numbers from 0 to 255. | |
| Unreal FColor | FColor(25, 25, 112, 255)Whole numbers from 0 to 255 — use when an API asks for FColor, not FLinearColor. | |
| Godot Color | Color(0.098, 0.098, 0.439, 1) | |
| Flutter Color | Color(0xFF191970)Packed ARGB, so alpha comes first. | |
| Android Color | Color.rgb(25, 25, 112) | |
| SwiftUI Color | Color(red: 0.098, green: 0.098, blue: 0.439) | |
| UIKit UIColor | UIColor(red: 0.098, green: 0.098, blue: 0.439, alpha: 1) |
Raw valuesPacked integers and plain arrays.
| 0x hex | 0x191970 | |
|---|---|---|
| 0x hex (ARGB) | 0xFF191970 | |
| Array 0–1 | [0.098, 0.098, 0.439] | |
| Array 0–255 | [25, 25, 112] | |
| Decimal integer | 1644912 |
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 |
|---|---|---|---|---|
| Midnight Blue on white | 14.85:1 | AAA | Lc 101 | Body text at any size |
| Midnight Blue on black | 1.41:1 | Fail | Lc 0 | Not usable for text |
Midnight Blue text on a white background
Midnight Blue text on a black background
White text on Midnight Blue
Black text on Midnight Blue
Tonal scale
Hue held fixed while lightness walks OKLCh, ready to use as a design system ramp.
- 50#f0f7ff
- 100#e3ecff
- 200#ccdaff
- 300#aec1ff
- 400#8ca2ff
- 500#6f83e2
- 600#5769c2
- 700#4352a4
- 800#333f89
- 900#262f72
- 950#12174c
Tints and shades
Mixed perceptually toward white and black, so the steps feel evenly spaced.
- Tint 1#354189
- Tint 2#5866a2
- Tint 3#7e8bba
- Tint 4#a7b1d1
- Tint 5#d2d7e8
- Shade 1#111156
- Shade 2#09093e
- Shade 3#040427
- Shade 4#010112
- Shade 5#000002
Colours that work with Midnight Blue
Complementary, triadic and analogous partners, rotated in OKLCh so they keep the same apparent brightness.
- #382900
- #5d0000
- #00380d
- #002d57
- #3a0663
Closest CSS names
midnightblueexact matchnavyΔEok 0.054darkblueΔEok 0.061indigoΔEok 0.101darkslateblueΔEok 0.131mediumblueΔEok 0.158