#40307D#40307D

#40307D is a dark, vivid violet. Relative luminance 0.047; OKLCH L 37.2% C 0.125 H 288.4°. Best body text is #FFFFFF at 10.84:1 contrast (WCAG AA passes).

Color values

HEX#40307D
RGBrgb(64, 48, 125)
HSLhsl(252, 45%, 34%)
HSVhsv(252, 62%, 49%)
CMYKcmyk(48.8%, 61.6%, 0%, 51%)
CIE-LABlab(25.82, 28.06, -41.48)
CIE-LCHlch(25.82, 50.08, 304.07°)
OKLaboklab(37.22% 0.0393 -0.1185)
OKLCHoklch(37.22% 0.125 288.4)
XYZxyz(6.8719, 4.6843, 19.9401)
Luminance0.0469 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40307D #6D7D30
analogous
#30477D #40307D #67307D
triadic
#40307D #7D4030 #307D40
tetradic
#40307D #7D3047 #6D7D30 #307D67
square
#40307D #7D3047 #6D7D30 #307D67
split-complementary
#40307D #7D6730 #477D30
monochromatic
#130E25 #291F51 #40307D #5741A9 #7864C3

Accessibility & contrast

On white

10.84
#40307D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.94
#40307D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40307D
10.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40307D#FFFFFF#000000##FFFFFF
##40307D1.0010.841.9410.84
#FFFFFF10.841.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.841.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F80
Deuteranopia (green-blind)
#003B7B
Tritanopia (blue-blind)
#2C4251
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #40307d;
/* rgb */ color: rgb(64, 48, 125);
/* oklch */ color: oklch(37.2% 0.125 288.4);
Tailwind
colors: {
  custom: {
    50: '#7a69a3',
    500: '#40307d',
    950: '#000000',
  },
}
SCSS
$custom: #40307d;
$custom-light: #7a69a3;
$custom-dark: #000000;
JSON
{
  "hex": "#40307d",
  "rgb": {
    "r": 64,
    "g": 48,
    "b": 125
  },
  "hsl": {
    "h": 252.468,
    "s": 44.509,
    "l": 33.922
  },
  "oklch": {
    "l": 0.37223,
    "c": 0.12487,
    "h": 288.4
  },
  "luminance": 0.04685
}

Semantic roles & 50–950 ramp

primary
#40307D
secondary
#9BAB5E
accent
#D454B9
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A060F
muted
#7C7A7F

Preview Lab

Preview with #40307D

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

Preview Lab → · Contrast checker → · Palette generator →

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