#40398D#40398D

#40398D is a dark, vivid blue. Relative luminance 0.059; OKLCH L 40.1% C 0.135 H 282.2°. Best body text is #FFFFFF at 9.60:1 contrast (WCAG AA passes).

Color values

HEX#40398D
RGBrgb(64, 57, 141)
HSLhsl(245, 42%, 39%)
HSVhsv(245, 60%, 55%)
CMYKcmyk(54.6%, 59.6%, 0%, 44.7%)
CIE-LABlab(29.26, 27.50, -45.89)
CIE-LCHlch(29.26, 53.50, 300.93°)
OKLaboklab(40.14% 0.0285 -0.1314)
OKLCHoklch(40.14% 0.135 282.2)
XYZxyz(8.3837, 5.9388, 25.8987)
Luminance0.0594 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40398D #868D39
analogous
#395C8D #40398D #6A398D
triadic
#40398D #8D4039 #398D40
tetradic
#40398D #8D395C #868D39 #398D6A
square
#40398D #8D395C #868D39 #398D6A
split-complementary
#40398D #8D6A39 #5C8D39
monochromatic
#181636 #2C2761 #40398D #554CB7 #7F78C8

Accessibility & contrast

On white

9.60
#40398D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40398D
9.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40398D#FFFFFF#000000##FFFFFF
##40398D1.009.602.199.60
#FFFFFF9.601.0021.001.00
#0000002.1921.001.0021.00
##FFFFFF9.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004890
Deuteranopia (green-blind)
#00428B
Tritanopia (blue-blind)
#1F4D5D
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #40398d;
/* rgb */ color: rgb(64, 57, 141);
/* oklch */ color: oklch(40.1% 0.135 282.2);
Tailwind
colors: {
  custom: {
    50: '#7c6faf',
    500: '#40398d',
    950: '#000000',
  },
}
SCSS
$custom: #40398d;
$custom-light: #7c6faf;
$custom-dark: #000000;
JSON
{
  "hex": "#40398d",
  "rgb": {
    "r": 64,
    "g": 57,
    "b": 141
  },
  "hsl": {
    "h": 245,
    "s": 42.424,
    "l": 38.824
  },
  "oklch": {
    "l": 0.40142,
    "c": 0.1345,
    "h": 282.2
  },
  "luminance": 0.05939
}

Semantic roles & 50–950 ramp

primary
#40398D
secondary
#ACB270
accent
#D256C8
background
#F7F6FA
surface
#EEECF4
border
#C9C7CE
text
#0A0710
muted
#7C7A7F

Preview Lab

Preview with #40398D

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

Preview Lab → · Contrast checker → · Palette generator →

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