#40318D#40318D

#40318D is a dark, vivid blue. Relative luminance 0.052; OKLCH L 38.7% C 0.146 H 284.8°. Best body text is #FFFFFF at 10.28:1 contrast (WCAG AA passes).

Color values

HEX#40318D
RGBrgb(64, 49, 141)
HSLhsl(250, 48%, 37%)
HSVhsv(250, 65%, 55%)
CMYKcmyk(54.6%, 65.2%, 0%, 44.7%)
CIE-LABlab(27.32, 32.56, -49.03)
CIE-LCHlch(27.32, 58.86, 303.59°)
OKLaboklab(38.72% 0.0371 -0.1407)
OKLCHoklch(38.72% 0.146 284.8)
XYZxyz(8.0189, 5.2093, 25.7771)
Luminance0.0521 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40318D #7E8D31
analogous
#31508D #40318D #6E318D
triadic
#40318D #8D4031 #318D40
tetradic
#40318D #8D3150 #7E8D31 #318D6E
square
#40318D #8D3150 #7E8D31 #318D6E
split-complementary
#40318D #8D6E31 #508D31
monochromatic
#171132 #2B2160 #40318D #5541BA #7C6CCC

Accessibility & contrast

On white

10.28
#40318D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.04
#40318D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40318D
10.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40318D#FFFFFF#000000##FFFFFF
##40318D1.0010.282.0410.28
#FFFFFF10.281.0021.001.00
#0000002.0421.001.0021.00
##FFFFFF10.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004390
Deuteranopia (green-blind)
#003E8B
Tritanopia (blue-blind)
#20475A
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #40318d;
/* rgb */ color: rgb(64, 49, 141);
/* oklch */ color: oklch(38.7% 0.146 284.8);
Tailwind
colors: {
  custom: {
    50: '#7c6aaf',
    500: '#40318d',
    950: '#000000',
  },
}
SCSS
$custom: #40318d;
$custom-light: #7c6aaf;
$custom-dark: #000000;
JSON
{
  "hex": "#40318d",
  "rgb": {
    "r": 64,
    "g": 49,
    "b": 141
  },
  "hsl": {
    "h": 249.783,
    "s": 48.421,
    "l": 37.255
  },
  "oklch": {
    "l": 0.38724,
    "c": 0.14553,
    "h": 284.8
  },
  "luminance": 0.0521
}

Semantic roles & 50–950 ramp

primary
#40318D
secondary
#A7B466
accent
#D850C2
background
#F7F6FA
surface
#EEEBF5
border
#C9C6CF
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #40318D

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

Preview Lab → · Contrast checker → · Palette generator →

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