#040839#040839

#040839 is a very dark, moderate blue. Relative luminance 0.005; OKLCH L 17.9% C 0.093 H 268.4°. Best body text is #FFFFFF at 19.11:1 contrast (WCAG AA passes).

Color values

HEX#040839
RGBrgb(4, 8, 57)
HSLhsl(235, 87%, 12%)
HSVhsv(235, 93%, 22%)
CMYKcmyk(93%, 86%, 0%, 77.6%)
CIE-LABlab(4.47, 16.57, -30.74)
CIE-LCHlch(4.47, 34.93, 298.32°)
OKLaboklab(17.85% -0.0026 -0.0926)
OKLCHoklch(17.85% 0.093 268.4)
XYZxyz(0.8752, 0.4948, 3.9195)
Luminance0.0050 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040839 #393504
analogous
#042339 #040839 #1B0439
triadic
#040839 #390408 #083904
tetradic
#040839 #390423 #393504 #04391B
square
#040839 #390423 #393504 #04391B
split-complementary
#040839 #391B04 #233904
monochromatic
#02041D #02041D #040839 #081072 #0C18AB

Accessibility & contrast

On white

19.11
#040839 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040839
19.11:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040839#FFFFFF#000000##FFFFFF
##0408391.0019.111.1019.11
#FFFFFF19.111.0021.001.00
#0000001.1021.001.0021.00
##FFFFFF19.111.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00123A
Deuteranopia (green-blind)
#000D38
Tritanopia (blue-blind)
#001620
Achromatopsia (no color)
#0F0F0F

Design tokens & code

CSS
--color: #040839;
/* rgb */ color: rgb(4, 8, 57);
/* oklch */ color: oklch(17.9% 0.093 268.4);
Tailwind
colors: {
  custom: {
    50: '#4e4970',
    500: '#040839',
    950: '#000000',
  },
}
SCSS
$custom: #040839;
$custom-light: #4e4970;
$custom-dark: #000000;
JSON
{
  "hex": "#040839",
  "rgb": {
    "r": 4,
    "g": 8,
    "b": 57
  },
  "hsl": {
    "h": 235.472,
    "s": 86.885,
    "l": 11.961
  },
  "oklch": {
    "l": 0.17854,
    "c": 0.09265,
    "h": 268.4
  },
  "luminance": 0.00495
}

Semantic roles & 50–950 ramp

primary
#040839
secondary
#7B741E
accent
#ED2BFD
background
#F4F4F6
surface
#E7E6EC
border
#C3C2C7
text
#020107
muted
#78777A

Preview Lab

Preview with #040839

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

Preview Lab → · Contrast checker → · Palette generator →

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