#40398E#40398E

#40398E is a dark, vivid blue. Relative luminance 0.060; OKLCH L 40.2% C 0.136 H 282.1°. Best body text is #FFFFFF at 9.57:1 contrast (WCAG AA passes).

Color values

HEX#40398E
RGBrgb(64, 57, 142)
HSLhsl(245, 43%, 39%)
HSVhsv(245, 60%, 56%)
CMYKcmyk(54.9%, 59.9%, 0%, 44.3%)
CIE-LABlab(29.33, 27.83, -46.38)
CIE-LCHlch(29.33, 54.09, 300.96°)
OKLaboklab(40.22% 0.0285 -0.1329)
OKLCHoklch(40.22% 0.136 282.1)
XYZxyz(8.4585, 5.9687, 26.2923)
Luminance0.0597 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40398E #878E39
analogous
#395D8E #40398E #6B398E
triadic
#40398E #8E4039 #398E40
tetradic
#40398E #8E395D #878E39 #398E6B
square
#40398E #8E395D #878E39 #398E6B
split-complementary
#40398E #8E6B39 #5D8E39
monochromatic
#191637 #2C2762 #40398E #564DB7 #7F78C9

Accessibility & contrast

On white

9.57
#40398E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40398E
9.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40398E#FFFFFF#000000##FFFFFF
##40398E1.009.572.199.57
#FFFFFF9.571.0021.001.00
#0000002.1921.001.0021.00
##FFFFFF9.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004891
Deuteranopia (green-blind)
#00428C
Tritanopia (blue-blind)
#1E4D5E
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #40398e;
/* rgb */ color: rgb(64, 57, 142);
/* oklch */ color: oklch(40.2% 0.136 282.1);
Tailwind
colors: {
  custom: {
    50: '#7c6fb0',
    500: '#40398e',
    950: '#000000',
  },
}
SCSS
$custom: #40398e;
$custom-light: #7c6fb0;
$custom-dark: #000000;
JSON
{
  "hex": "#40398e",
  "rgb": {
    "r": 64,
    "g": 57,
    "b": 142
  },
  "hsl": {
    "h": 244.941,
    "s": 42.714,
    "l": 39.02
  },
  "oklch": {
    "l": 0.40222,
    "c": 0.13591,
    "h": 282.1
  },
  "luminance": 0.05969
}

Semantic roles & 50–950 ramp

primary
#40398E
secondary
#ADB271
accent
#D255C8
background
#F7F6FA
surface
#EEECF5
border
#C9C7CF
text
#0A0710
muted
#7C7A7F

Preview Lab

Preview with #40398E

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

Preview Lab → · Contrast checker → · Palette generator →

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