#40397B#40397B

#40397B is a dark, moderate blue. Relative luminance 0.054; OKLCH L 38.8% C 0.108 H 285.0°. Best body text is #FFFFFF at 10.05:1 contrast (WCAG AA passes).

Color values

HEX#40397B
RGBrgb(64, 57, 123)
HSLhsl(246, 37%, 35%)
HSVhsv(246, 54%, 48%)
CMYKcmyk(48%, 53.7%, 0%, 51.8%)
CIE-LABlab(27.97, 21.56, -36.75)
CIE-LCHlch(27.97, 42.61, 300.40°)
OKLaboklab(38.77% 0.028 -0.1046)
OKLCHoklch(38.77% 0.108 285)
XYZxyz(7.1516, 5.4460, 19.4094)
Luminance0.0545 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40397B #747B39
analogous
#39537B #40397B #61397B
triadic
#40397B #7B4039 #397B40
tetradic
#40397B #7B3953 #747B39 #397B61
square
#40397B #7B3953 #747B39 #397B61
split-complementary
#40397B #7B6139 #537B39
monochromatic
#141227 #2A2651 #40397B #564CA5 #7971BD

Accessibility & contrast

On white

10.05
#40397B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#40397B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40397B
10.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40397B#FFFFFF#000000##FFFFFF
##40397B1.0010.052.0910.05
#FFFFFF10.051.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1A447D
Deuteranopia (green-blind)
#18407A
Tritanopia (blue-blind)
#2D4754
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #40397b;
/* rgb */ color: rgb(64, 57, 123);
/* oklch */ color: oklch(38.8% 0.108 285.0);
Tailwind
colors: {
  custom: {
    50: '#796fa2',
    500: '#40397b',
    950: '#000000',
  },
}
SCSS
$custom: #40397b;
$custom-light: #796fa2;
$custom-dark: #000000;
JSON
{
  "hex": "#40397b",
  "rgb": {
    "r": 64,
    "g": 57,
    "b": 123
  },
  "hsl": {
    "h": 246.364,
    "s": 36.667,
    "l": 35.294
  },
  "oklch": {
    "l": 0.38774,
    "c": 0.10825,
    "h": 285
  },
  "luminance": 0.05446
}

Semantic roles & 50–950 ramp

primary
#40397B
secondary
#A0A669
accent
#CD5BC1
background
#F7F6FA
surface
#EEECF3
border
#C9C7CD
text
#09070F
muted
#7B7A7F

Preview Lab

Preview with #40397B

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

Preview Lab → · Contrast checker → · Palette generator →

#40397B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva