#40397F#40397F

#40397F is a dark, moderate blue. Relative luminance 0.055; OKLCH L 39.1% C 0.114 H 284.3°. Best body text is #FFFFFF at 9.95:1 contrast (WCAG AA passes).

Color values

HEX#40397F
RGBrgb(64, 57, 127)
HSLhsl(246, 38%, 36%)
HSVhsv(246, 55%, 50%)
CMYKcmyk(49.6%, 55.1%, 0%, 50.2%)
CIE-LABlab(28.24, 22.87, -38.82)
CIE-LCHlch(28.24, 45.06, 300.50°)
OKLaboklab(39.07% 0.0282 -0.1107)
OKLCHoklch(39.07% 0.114 284.3)
XYZxyz(7.4071, 5.5482, 20.7552)
Luminance0.0555 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40397F #787F39
analogous
#39557F #40397F #63397F
triadic
#40397F #7F4039 #397F40
tetradic
#40397F #7F3955 #787F39 #397F63
square
#40397F #7F3955 #787F39 #397F63
split-complementary
#40397F #7F6339 #557F39
monochromatic
#15132B #2B2655 #40397F #554CA9 #7A72C0

Accessibility & contrast

On white

9.95
#40397F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.11
#40397F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40397F
9.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40397F#FFFFFF#000000##FFFFFF
##40397F1.009.952.119.95
#FFFFFF9.951.0021.001.00
#0000002.1121.001.0021.00
##FFFFFF9.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#154581
Deuteranopia (green-blind)
#11407D
Tritanopia (blue-blind)
#2A4856
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #40397f;
/* rgb */ color: rgb(64, 57, 127);
/* oklch */ color: oklch(39.1% 0.114 284.3);
Tailwind
colors: {
  custom: {
    50: '#7a6fa5',
    500: '#40397f',
    950: '#000000',
  },
}
SCSS
$custom: #40397f;
$custom-light: #7a6fa5;
$custom-dark: #000000;
JSON
{
  "hex": "#40397f",
  "rgb": {
    "r": 64,
    "g": 57,
    "b": 127
  },
  "hsl": {
    "h": 246,
    "s": 38.043,
    "l": 36.078
  },
  "oklch": {
    "l": 0.39066,
    "c": 0.11421,
    "h": 284.3
  },
  "luminance": 0.05549
}

Semantic roles & 50–950 ramp

primary
#40397F
secondary
#A3A96B
accent
#CE5AC2
background
#F7F6FA
surface
#EEECF4
border
#C9C7CE
text
#09070F
muted
#7B7A7F

Preview Lab

Preview with #40397F

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

Preview Lab → · Contrast checker → · Palette generator →

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