#04031F#04031F

#04031F is a very dark, moderate blue. Relative luminance 0.002; OKLCH L 13.0% C 0.061 H 276.2°. Best body text is #FFFFFF at 20.23:1 contrast (WCAG AA passes).

Color values

HEX#04031F
RGBrgb(4, 3, 31)
HSLhsl(242, 82%, 7%)
HSVhsv(242, 90%, 12%)
CMYKcmyk(87.1%, 90.3%, 0%, 87.8%)
CIE-LABlab(1.71, 6.12, -15.35)
CIE-LCHlch(1.71, 16.52, 291.75°)
OKLaboklab(12.97% 0.0067 -0.061)
OKLCHoklch(12.97% 0.061 276.2)
XYZxyz(0.3299, 0.1898, 1.3153)
Luminance0.0019 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#04031F #1E1F03
analogous
#03101F #04031F #12031F
triadic
#04031F #1F0403 #031F04
tetradic
#04031F #1F0310 #1E1F03 #031F12
square
#04031F #1F0310 #1E1F03 #031F12
split-complementary
#04031F #1F1203 #101F03
monochromatic
#04031C #04031C #04031F #0B0857 #120E8F

Accessibility & contrast

On white

20.23
#04031F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.04
#04031F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #04031F
20.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##04031F#FFFFFF#000000##FFFFFF
##04031F1.0020.231.0420.23
#FFFFFF20.231.0021.001.00
#0000001.0421.001.0021.00
##FFFFFF20.231.0021.001.00

Color blindness preview

Protanopia (red-blind)
#000720
Deuteranopia (green-blind)
#00051E
Tritanopia (blue-blind)
#00090F
Achromatopsia (no color)
#060606

Design tokens & code

CSS
--color: #04031f;
/* rgb */ color: rgb(4, 3, 31);
/* oklch */ color: oklch(13.0% 0.061 276.2);
Tailwind
colors: {
  custom: {
    50: '#48485a',
    500: '#04031f',
    950: '#000000',
  },
}
SCSS
$custom: #04031f;
$custom-light: #48485a;
$custom-dark: #000000;
JSON
{
  "hex": "#04031f",
  "rgb": {
    "r": 4,
    "g": 3,
    "b": 31
  },
  "hsl": {
    "h": 242.143,
    "s": 82.353,
    "l": 6.667
  },
  "oklch": {
    "l": 0.12973,
    "c": 0.06141,
    "h": 276.2
  },
  "luminance": 0.0019
}

Semantic roles & 50–950 ramp

primary
#04031F
secondary
#61631B
accent
#F92FF1
background
#F4F4F5
surface
#E6E6E9
border
#C2C2C5
text
#000004
muted
#777779

Preview Lab

Preview with #04031F

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

Preview Lab → · Contrast checker → · Palette generator →

#04031F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva