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

Open in the picker

Midnight Blue in every format

Web & CSSThe everyday formats for stylesheets and design tools.

Hex#191970
RGBrgb(25 25 112)
RGB legacyrgb(25, 25, 112)
RGB percentrgb(9.8% 9.8% 43.92%)
HSLhsl(240 63.5% 26.9%)
HSL legacyhsl(240, 63.5%, 26.9%)
HSV / HSBhsv(240, 77.7%, 43.9%)
HWBhwb(240 9.8% 56.1%)
Nearest namemidnightblue
CMYKcmyk(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.

OKLChoklch(28.812% 0.14363 272.765)Modern CSS colour space for even palettes — better than HSL when building scales.
OKLaboklab(28.812% 0.00693 -0.14346)
CIE LChlch(14.929% 57.139 297.016)
CIE Lablab(14.929% 25.955 -50.904)
Display P3color(display-p3 0.098 0.098 0.4215)
Rec. 2020color(rec2020 0.0734 0.0515 0.3633)
srgb-linearcolor(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 — sRGBvec3(0.098, 0.098, 0.439)Encoded values. Use when writing straight to the framebuffer.
GLSL vec3 — linearvec3(0.01, 0.01, 0.162)Light-linear values. Use for lighting, blending and mixing.
GLSL vec4 — sRGBvec4(0.098, 0.098, 0.439, 1.0)
GLSL vec4 — linearvec4(0.01, 0.01, 0.162, 1.0)
GLSL ivec3ivec3(25, 25, 112)
HLSL float3 — sRGBfloat3(0.098, 0.098, 0.439)
HLSL float3 — linearfloat3(0.01, 0.01, 0.162)
HLSL float4 — sRGBfloat4(0.098, 0.098, 0.439, 1.0)
HLSL half4 — sRGBhalf4(0.098, 0.098, 0.439, 1.0)
WGSL vec3f — sRGBvec3f(0.098, 0.098, 0.439)
WGSL vec4f — sRGBvec4f(0.098, 0.098, 0.439, 1.0)
WGSL vec3<f32> — linearvec3<f32>(0.01, 0.01, 0.162)

Engines & appsConstructors for Unity, Unreal, Godot, Flutter, SwiftUI and Android.

Unity Colornew 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 Color32new Color32(25, 25, 112, 255)
Unreal FLinearColorFLinearColor(0.0097f, 0.0097f, 0.162f, 1.0f)FLinearColor for materials and lighting. FColor when you need whole numbers from 0 to 255.
Unreal FColorFColor(25, 25, 112, 255)Whole numbers from 0 to 255 — use when an API asks for FColor, not FLinearColor.
Godot ColorColor(0.098, 0.098, 0.439, 1)
Flutter ColorColor(0xFF191970)Packed ARGB, so alpha comes first.
Android ColorColor.rgb(25, 25, 112)
SwiftUI ColorColor(red: 0.098, green: 0.098, blue: 0.439)
UIKit UIColorUIColor(red: 0.098, green: 0.098, blue: 0.439, alpha: 1)

Raw valuesPacked integers and plain arrays.

0x hex0x191970
0x hex (ARGB)0xFF191970
Array 0–1[0.098, 0.098, 0.439]
Array 0–255[25, 25, 112]
Decimal integer1644912

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.

PairingWCAG 2 ratioLevelAPCASuitable for
Midnight Blue on white14.85:1AAALc 101Body text at any size
Midnight Blue on black1.41:1FailLc 0Not 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 match
  • navyΔEok 0.054
  • darkblueΔEok 0.061
  • indigoΔEok 0.101
  • darkslateblueΔEok 0.131
  • mediumblueΔEok 0.158