#040837#040837

#040837 is a very dark, moderate blue. Relative luminance 0.005; OKLCH L 17.6% C 0.090 H 268.5°. Best body text is #FFFFFF at 19.18:1 contrast (WCAG AA passes).

Color values

HEX#040837
RGBrgb(4, 8, 55)
HSLhsl(235, 86%, 12%)
HSVhsv(235, 93%, 22%)
CMYKcmyk(92.7%, 85.5%, 0%, 78.4%)
CIE-LABlab(4.29, 15.35, -29.57)
CIE-LCHlch(4.29, 33.32, 297.43°)
OKLaboklab(17.59% -0.0023 -0.0896)
OKLCHoklch(17.59% 0.09 268.5)
XYZxyz(0.8263, 0.4752, 3.6619)
Luminance0.0047 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040837 #373304
analogous
#042237 #040837 #1A0437
triadic
#040837 #370408 #083704
tetradic
#040837 #370422 #373304 #04371A
square
#040837 #370422 #373304 #04371A
split-complementary
#040837 #371A04 #223704
monochromatic
#02041D #02041D #040837 #081070 #0C19A9

Accessibility & contrast

On white

19.18
#040837 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.10
#040837 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040837
19.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040837#FFFFFF#000000##FFFFFF
##0408371.0019.181.1019.18
#FFFFFF19.181.0021.001.00
#0000001.1021.001.0021.00
##FFFFFF19.181.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001238
Deuteranopia (green-blind)
#000C36
Tritanopia (blue-blind)
#00161E
Achromatopsia (no color)
#0F0F0F

Design tokens & code

CSS
--color: #040837;
/* rgb */ color: rgb(4, 8, 55);
/* oklch */ color: oklch(17.6% 0.090 268.5);
Tailwind
colors: {
  custom: {
    50: '#4d496e',
    500: '#040837',
    950: '#000000',
  },
}
SCSS
$custom: #040837;
$custom-light: #4d496e;
$custom-dark: #000000;
JSON
{
  "hex": "#040837",
  "rgb": {
    "r": 4,
    "g": 8,
    "b": 55
  },
  "hsl": {
    "h": 235.294,
    "s": 86.441,
    "l": 11.569
  },
  "oklch": {
    "l": 0.17588,
    "c": 0.08967,
    "h": 268.5
  },
  "luminance": 0.00475
}

Semantic roles & 50–950 ramp

primary
#040837
secondary
#79721E
accent
#EC2BFD
background
#F4F4F6
surface
#E7E7EC
border
#C3C3C7
text
#020107
muted
#78777A

Preview Lab

Preview with #040837

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

Preview Lab → · Contrast checker → · Palette generator →

#040837 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva