#40318C#40318C

#40318C is a dark, vivid blue. Relative luminance 0.052; OKLCH L 38.6% C 0.144 H 285.0°. Best body text is #FFFFFF at 10.31:1 contrast (WCAG AA passes).

Color values

HEX#40318C
RGBrgb(64, 49, 140)
HSLhsl(250, 48%, 37%)
HSVhsv(250, 65%, 55%)
CMYKcmyk(54.3%, 65%, 0%, 45.1%)
CIE-LABlab(27.24, 32.24, -48.54)
CIE-LCHlch(27.24, 58.27, 303.59°)
OKLaboklab(38.64% 0.0372 -0.1393)
OKLCHoklch(38.64% 0.144 285)
XYZxyz(7.9449, 5.1796, 25.3870)
Luminance0.0518 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40318C #7D8C31
analogous
#31508C #40318C #6E318C
triadic
#40318C #8C4031 #318C40
tetradic
#40318C #8C3150 #7D8C31 #318C6E
square
#40318C #8C3150 #7D8C31 #318C6E
split-complementary
#40318C #8C6E31 #508C31
monochromatic
#171131 #2B215F #40318C #5541B9 #7C6CCC

Accessibility & contrast

On white

10.31
#40318C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40318C
10.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40318C#FFFFFF#000000##FFFFFF
##40318C1.0010.312.0410.31
#FFFFFF10.311.0021.001.00
#0000002.0421.001.0021.00
##FFFFFF10.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00438F
Deuteranopia (green-blind)
#003E8A
Tritanopia (blue-blind)
#21475A
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #40318c;
/* rgb */ color: rgb(64, 49, 140);
/* oklch */ color: oklch(38.6% 0.144 285.0);
Tailwind
colors: {
  custom: {
    50: '#7c6aae',
    500: '#40318c',
    950: '#000000',
  },
}
SCSS
$custom: #40318c;
$custom-light: #7c6aae;
$custom-dark: #000000;
JSON
{
  "hex": "#40318c",
  "rgb": {
    "r": 64,
    "g": 49,
    "b": 140
  },
  "hsl": {
    "h": 249.89,
    "s": 48.148,
    "l": 37.059
  },
  "oklch": {
    "l": 0.38638,
    "c": 0.14417,
    "h": 285
  },
  "luminance": 0.0518
}

Semantic roles & 50–950 ramp

primary
#40318C
secondary
#A6B366
accent
#D850C1
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #40318C

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

Preview Lab → · Contrast checker → · Palette generator →

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