#040A40#040A40

#040A40 is a very dark, moderate blue. Relative luminance 0.006; OKLCH L 19.2% C 0.100 H 267.5°. Best body text is #FFFFFF at 18.71:1 contrast (WCAG AA passes).

Color values

HEX#040A40
RGBrgb(4, 10, 64)
HSLhsl(234, 88%, 13%)
HSVhsv(234, 94%, 25%)
CMYKcmyk(93.8%, 84.4%, 0%, 74.9%)
CIE-LABlab(5.54, 19.71, -34.06)
CIE-LCHlch(5.54, 39.35, 300.06°)
OKLaboklab(19.17% -0.0045 -0.1003)
OKLCHoklch(19.17% 0.1 267.5)
XYZxyz(1.0837, 0.6129, 4.9107)
Luminance0.0061 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040A40 #403A04
analogous
#042840 #040A40 #1C0440
triadic
#040A40 #40040A #0A4004
tetradic
#040A40 #400428 #403A04 #04401C
square
#040A40 #400428 #403A04 #04401C
split-complementary
#040A40 #401C04 #284004
monochromatic
#02051D #02051D #040A40 #08137A #0B1CB3

Accessibility & contrast

On white

18.71
#040A40 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.12
#040A40 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040A40
18.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040A40#FFFFFF#000000##FFFFFF
##040A401.0018.711.1218.71
#FFFFFF18.711.0021.001.00
#0000001.1221.001.0021.00
##FFFFFF18.711.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001542
Deuteranopia (green-blind)
#000F3F
Tritanopia (blue-blind)
#001A24
Achromatopsia (no color)
#121212

Design tokens & code

CSS
--color: #040a40;
/* rgb */ color: rgb(4, 10, 64);
/* oklch */ color: oklch(19.2% 0.100 267.5);
Tailwind
colors: {
  custom: {
    50: '#514a75',
    500: '#040a40',
    950: '#000000',
  },
}
SCSS
$custom: #040a40;
$custom-light: #514a75;
$custom-dark: #000000;
JSON
{
  "hex": "#040a40",
  "rgb": {
    "r": 4,
    "g": 10,
    "b": 64
  },
  "hsl": {
    "h": 234,
    "s": 88.235,
    "l": 13.333
  },
  "oklch": {
    "l": 0.1917,
    "c": 0.10037,
    "h": 267.5
  },
  "luminance": 0.00613
}

Semantic roles & 50–950 ramp

primary
#040A40
secondary
#81771F
accent
#E929FE
background
#F4F4F7
surface
#E7E7ED
border
#C3C3C8
text
#030108
muted
#78777B

Preview Lab

Preview with #040A40

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#040A40 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva