#040340#040340

#040340 is a very dark, moderate blue. Relative luminance 0.005; OKLCH L 17.8% C 0.109 H 268.6°. Best body text is #FFFFFF at 19.23:1 contrast (WCAG AA passes).

Color values

HEX#040340
RGBrgb(4, 3, 64)
HSLhsl(241, 91%, 13%)
HSVhsv(241, 95%, 25%)
CMYKcmyk(93.8%, 95.3%, 0%, 74.9%)
CIE-LABlab(4.16, 22.93, -36.30)
CIE-LCHlch(4.16, 42.94, 302.27°)
OKLaboklab(17.83% -0.0026 -0.1093)
OKLCHoklch(17.83% 0.109 268.6)
XYZxyz(1.0077, 0.4610, 4.8854)
Luminance0.0046 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040340 #3F4003
analogous
#032040 #040340 #220340
triadic
#040340 #400403 #034004
tetradic
#040340 #400320 #3F4003 #034022
square
#040340 #400320 #3F4003 #034022
split-complementary
#040340 #402203 #204003
monochromatic
#02011D #02011D #040340 #08067A #0B08B5

Accessibility & contrast

On white

19.23
#040340 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.09
#040340 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040340
19.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040340#FFFFFF#000000##FFFFFF
##0403401.0019.231.0919.23
#FFFFFF19.231.0021.001.00
#0000001.0921.001.0021.00
##FFFFFF19.231.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001242
Deuteranopia (green-blind)
#000B3F
Tritanopia (blue-blind)
#001722
Achromatopsia (no color)
#0F0F0F

Design tokens & code

CSS
--color: #040340;
/* rgb */ color: rgb(4, 3, 64);
/* oklch */ color: oklch(17.8% 0.109 268.6);
Tailwind
colors: {
  custom: {
    50: '#514676',
    500: '#040340',
    950: '#000000',
  },
}
SCSS
$custom: #040340;
$custom-light: #514676;
$custom-dark: #000000;
JSON
{
  "hex": "#040340",
  "rgb": {
    "r": 4,
    "g": 3,
    "b": 64
  },
  "hsl": {
    "h": 240.984,
    "s": 91.045,
    "l": 13.137
  },
  "oklch": {
    "l": 0.17825,
    "c": 0.10934,
    "h": 268.6
  },
  "luminance": 0.00461
}

Semantic roles & 50–950 ramp

primary
#040340
secondary
#80821D
accent
#FF29FB
background
#F4F3F7
surface
#E8E5ED
border
#C4C1C8
text
#030008
muted
#78777B

Preview Lab

Preview with #040340

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

Preview Lab → · Contrast checker → · Palette generator →

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