#40339F#40339F

#40339F is a dark, vivid blue. Relative luminance 0.060; OKLCH L 40.6% C 0.167 H 281.4°. Best body text is #FFFFFF at 9.58:1 contrast (WCAG AA passes).

Color values

HEX#40339F
RGBrgb(64, 51, 159)
HSLhsl(247, 51%, 41%)
HSVhsv(247, 68%, 62%)
CMYKcmyk(59.7%, 67.9%, 0%, 37.6%)
CIE-LABlab(29.31, 37.17, -56.81)
CIE-LCHlch(29.31, 67.89, 303.20°)
OKLaboklab(40.64% 0.0331 -0.1636)
OKLCHoklch(40.64% 0.167 281.4)
XYZxyz(9.5542, 5.9602, 33.4411)
Luminance0.0596 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40339F #929F33
analogous
#335C9F #40339F #76339F
triadic
#40339F #9F4033 #339F40
tetradic
#40339F #9F335C #929F33 #339F76
square
#40339F #9F335C #929F33 #339F76
split-complementary
#40339F #9F7633 #5C9F33
monochromatic
#1B1542 #2D2471 #40339F #594AC5 #8479D4

Accessibility & contrast

On white

9.58
#40339F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.19
#40339F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40339F
9.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40339F#FFFFFF#000000##FFFFFF
##40339F1.009.582.199.58
#FFFFFF9.581.0021.001.00
#0000002.1921.001.0021.00
##FFFFFF9.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0049A2
Deuteranopia (green-blind)
#00419D
Tritanopia (blue-blind)
#004F64
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #40339f;
/* rgb */ color: rgb(64, 51, 159);
/* oklch */ color: oklch(40.6% 0.167 281.4);
Tailwind
colors: {
  custom: {
    50: '#7f6cbc',
    500: '#40339f',
    950: '#000000',
  },
}
SCSS
$custom: #40339f;
$custom-light: #7f6cbc;
$custom-dark: #000000;
JSON
{
  "hex": "#40339f",
  "rgb": {
    "r": 64,
    "g": 51,
    "b": 159
  },
  "hsl": {
    "h": 247.222,
    "s": 51.429,
    "l": 41.176
  },
  "oklch": {
    "l": 0.40642,
    "c": 0.16688,
    "h": 281.4
  },
  "luminance": 0.05961
}

Semantic roles & 50–950 ramp

primary
#40339F
secondary
#B3BC71
accent
#DB4DCA
background
#F8F6FB
surface
#EFEBF7
border
#CAC6D0
text
#0B0712
muted
#7C7A81

Preview Lab

Preview with #40339F

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

Preview Lab → · Contrast checker → · Palette generator →

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