#40318E#40318E

#40318E is a dark, vivid blue. Relative luminance 0.052; OKLCH L 38.8% C 0.147 H 284.6°. Best body text is #FFFFFF at 10.25:1 contrast (WCAG AA passes).

Color values

HEX#40318E
RGBrgb(64, 49, 142)
HSLhsl(250, 49%, 37%)
HSVhsv(250, 65%, 56%)
CMYKcmyk(54.9%, 65.5%, 0%, 44.3%)
CIE-LABlab(27.41, 32.88, -49.51)
CIE-LCHlch(27.41, 59.44, 303.59°)
OKLaboklab(38.81% 0.037 -0.1421)
OKLCHoklch(38.81% 0.147 284.6)
XYZxyz(8.0937, 5.2392, 26.1707)
Luminance0.0524 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40318E #7F8E31
analogous
#31518E #40318E #6E318E
triadic
#40318E #8E4031 #318E40
tetradic
#40318E #8E3151 #7F8E31 #318E6E
square
#40318E #8E3151 #7F8E31 #318E6E
split-complementary
#40318E #8E6E31 #518E31
monochromatic
#171233 #2B2161 #40318E #5541BB #7C6DCD

Accessibility & contrast

On white

10.25
#40318E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.05
#40318E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40318E
10.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40318E#FFFFFF#000000##FFFFFF
##40318E1.0010.252.0510.25
#FFFFFF10.251.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004391
Deuteranopia (green-blind)
#003E8C
Tritanopia (blue-blind)
#1F485B
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #40318e;
/* rgb */ color: rgb(64, 49, 142);
/* oklch */ color: oklch(38.8% 0.147 284.6);
Tailwind
colors: {
  custom: {
    50: '#7d6ab0',
    500: '#40318e',
    950: '#000000',
  },
}
SCSS
$custom: #40318e;
$custom-light: #7d6ab0;
$custom-dark: #000000;
JSON
{
  "hex": "#40318e",
  "rgb": {
    "r": 64,
    "g": 49,
    "b": 142
  },
  "hsl": {
    "h": 249.677,
    "s": 48.691,
    "l": 37.451
  },
  "oklch": {
    "l": 0.3881,
    "c": 0.14688,
    "h": 284.6
  },
  "luminance": 0.0524
}

Semantic roles & 50–950 ramp

primary
#40318E
secondary
#A8B467
accent
#D850C2
background
#F8F6FA
surface
#EFEBF5
border
#CAC6CF
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #40318E

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

Preview Lab → · Contrast checker → · Palette generator →

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