#40339D#40339D

#40339D is a dark, vivid blue. Relative luminance 0.059; OKLCH L 40.5% C 0.164 H 281.7°. Best body text is #FFFFFF at 9.64:1 contrast (WCAG AA passes).

Color values

HEX#40339D
RGBrgb(64, 51, 157)
HSLhsl(247, 51%, 41%)
HSVhsv(247, 68%, 62%)
CMYKcmyk(59.2%, 67.5%, 0%, 38.4%)
CIE-LABlab(29.14, 36.52, -55.89)
CIE-LCHlch(29.14, 66.76, 303.17°)
OKLaboklab(40.46% 0.0334 -0.1608)
OKLCHoklch(40.46% 0.164 281.7)
XYZxyz(9.3821, 5.8913, 32.5345)
Luminance0.0589 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40339D #909D33
analogous
#335B9D #40339D #75339D
triadic
#40339D #9D4033 #339D40
tetradic
#40339D #9D335B #909D33 #339D75
square
#40339D #9D335B #909D33 #339D75
split-complementary
#40339D #9D7533 #5B9D33
monochromatic
#1A1541 #2D246F #40339D #5849C4 #8377D3

Accessibility & contrast

On white

9.64
#40339D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.18
#40339D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40339D
9.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40339D#FFFFFF#000000##FFFFFF
##40339D1.009.642.189.64
#FFFFFF9.641.0021.001.00
#0000002.1821.001.0021.00
##FFFFFF9.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048A0
Deuteranopia (green-blind)
#00419B
Tritanopia (blue-blind)
#054E63
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #40339d;
/* rgb */ color: rgb(64, 51, 157);
/* oklch */ color: oklch(40.5% 0.164 281.7);
Tailwind
colors: {
  custom: {
    50: '#7f6cbb',
    500: '#40339d',
    950: '#000000',
  },
}
SCSS
$custom: #40339d;
$custom-light: #7f6cbb;
$custom-dark: #000000;
JSON
{
  "hex": "#40339d",
  "rgb": {
    "r": 64,
    "g": 51,
    "b": 157
  },
  "hsl": {
    "h": 247.358,
    "s": 50.962,
    "l": 40.784
  },
  "oklch": {
    "l": 0.40461,
    "c": 0.16426,
    "h": 281.7
  },
  "luminance": 0.05892
}

Semantic roles & 50–950 ramp

primary
#40339D
secondary
#B2BB70
accent
#DA4DC9
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0712
muted
#7C7A81

Preview Lab

Preview with #40339D

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

Preview Lab → · Contrast checker → · Palette generator →

#40339D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva