#40339E#40339E

#40339E is a dark, vivid blue. Relative luminance 0.059; OKLCH L 40.6% C 0.166 H 281.6°. Best body text is #FFFFFF at 9.61:1 contrast (WCAG AA passes).

Color values

HEX#40339E
RGBrgb(64, 51, 158)
HSLhsl(247, 51%, 41%)
HSVhsv(247, 68%, 62%)
CMYKcmyk(59.5%, 67.7%, 0%, 38%)
CIE-LABlab(29.22, 36.85, -56.35)
CIE-LCHlch(29.22, 67.33, 303.18°)
OKLaboklab(40.55% 0.0332 -0.1622)
OKLCHoklch(40.55% 0.166 281.6)
XYZxyz(9.4678, 5.9256, 32.9860)
Luminance0.0593 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40339E #919E33
analogous
#335B9E #40339E #75339E
triadic
#40339E #9E4033 #339E40
tetradic
#40339E #9E335B #919E33 #339E75
square
#40339E #9E335B #919E33 #339E75
split-complementary
#40339E #9E7533 #5B9E33
monochromatic
#1B1541 #2D2470 #40339E #594AC4 #8378D3

Accessibility & contrast

On white

9.61
#40339E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40339E
9.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40339E#FFFFFF#000000##FFFFFF
##40339E1.009.612.199.61
#FFFFFF9.611.0021.001.00
#0000002.1921.001.0021.00
##FFFFFF9.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0049A1
Deuteranopia (green-blind)
#00419C
Tritanopia (blue-blind)
#024F64
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #40339e;
/* rgb */ color: rgb(64, 51, 158);
/* oklch */ color: oklch(40.6% 0.166 281.6);
Tailwind
colors: {
  custom: {
    50: '#7f6cbc',
    500: '#40339e',
    950: '#000000',
  },
}
SCSS
$custom: #40339e;
$custom-light: #7f6cbc;
$custom-dark: #000000;
JSON
{
  "hex": "#40339e",
  "rgb": {
    "r": 64,
    "g": 51,
    "b": 158
  },
  "hsl": {
    "h": 247.29,
    "s": 51.196,
    "l": 40.98
  },
  "oklch": {
    "l": 0.40551,
    "c": 0.16558,
    "h": 281.6
  },
  "luminance": 0.05926
}

Semantic roles & 50–950 ramp

primary
#40339E
secondary
#B3BC71
accent
#DB4DC9
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0712
muted
#7C7A81

Preview Lab

Preview with #40339E

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

Preview Lab → · Contrast checker → · Palette generator →

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