#040338#040338

#040338 is a very dark, moderate blue. Relative luminance 0.004; OKLCH L 16.6% C 0.099 H 269.7°. Best body text is #FFFFFF at 19.53:1 contrast (WCAG AA passes).

Color values

HEX#040338
RGBrgb(4, 3, 56)
HSLhsl(241, 90%, 12%)
HSVhsv(241, 95%, 22%)
CMYKcmyk(92.9%, 94.6%, 0%, 78%)
CIE-LABlab(3.40, 17.96, -31.75)
CIE-LCHlch(3.40, 36.47, 299.50°)
OKLaboklab(16.61% -0.0004 -0.0986)
OKLCHoklch(16.61% 0.099 269.7)
XYZxyz(0.7962, 0.3764, 3.7713)
Luminance0.0038 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040338 #373803
analogous
#031D38 #040338 #1F0338
triadic
#040338 #380403 #033804
tetradic
#040338 #38031D #373803 #03381F
square
#040338 #38031D #373803 #03381F
split-complementary
#040338 #381F03 #1D3803
monochromatic
#02021D #02021D #040338 #080672 #0C09AC

Accessibility & contrast

On white

19.53
#040338 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.08
#040338 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040338
19.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040338#FFFFFF#000000##FFFFFF
##0403381.0019.531.0819.53
#FFFFFF19.531.0021.001.00
#0000001.0821.001.0021.00
##FFFFFF19.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#000F39
Deuteranopia (green-blind)
#000937
Tritanopia (blue-blind)
#00131E
Achromatopsia (no color)
#0C0C0C

Design tokens & code

CSS
--color: #040338;
/* rgb */ color: rgb(4, 3, 56);
/* oklch */ color: oklch(16.6% 0.099 269.7);
Tailwind
colors: {
  custom: {
    50: '#4d476f',
    500: '#040338',
    950: '#000000',
  },
}
SCSS
$custom: #040338;
$custom-light: #4d476f;
$custom-dark: #000000;
JSON
{
  "hex": "#040338",
  "rgb": {
    "r": 4,
    "g": 3,
    "b": 56
  },
  "hsl": {
    "h": 241.132,
    "s": 89.831,
    "l": 11.569
  },
  "oklch": {
    "l": 0.16606,
    "c": 0.09863,
    "h": 269.7
  },
  "luminance": 0.00376
}

Semantic roles & 50–950 ramp

primary
#040338
secondary
#797B1C
accent
#FF29FB
background
#F4F3F6
surface
#E7E5EC
border
#C3C1C7
text
#020007
muted
#78777A

Preview Lab

Preview with #040338

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

Preview Lab → · Contrast checker → · Palette generator →

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