#40307B#40307B

#40307B is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.1% C 0.122 H 288.8°. Best body text is #FFFFFF at 10.90:1 contrast (WCAG AA passes).

Color values

HEX#40307B
RGBrgb(64, 48, 123)
HSLhsl(253, 44%, 34%)
HSVhsv(253, 61%, 48%)
CMYKcmyk(48%, 61%, 0%, 51.8%)
CIE-LABlab(25.66, 27.42, -40.46)
CIE-LCHlch(25.66, 48.88, 304.13°)
OKLaboklab(37.06% 0.0394 -0.1155)
OKLCHoklch(37.06% 0.122 288.8)
XYZxyz(6.7454, 4.6337, 19.2740)
Luminance0.0463 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40307B #6B7B30
analogous
#30457B #40307B #65307B
triadic
#40307B #7B4030 #307B40
tetradic
#40307B #7B3045 #6B7B30 #307B65
square
#40307B #7B3045 #6B7B30 #307B65
split-complementary
#40307B #7B6530 #457B30
monochromatic
#120E23 #291F4F #40307B #5741A7 #7763C2

Accessibility & contrast

On white

10.90
#40307B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.93
#40307B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40307B
10.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40307B#FFFFFF#000000##FFFFFF
##40307B1.0010.901.9310.90
#FFFFFF10.901.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E7D
Deuteranopia (green-blind)
#003B79
Tritanopia (blue-blind)
#2D4150
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #40307b;
/* rgb */ color: rgb(64, 48, 123);
/* oklch */ color: oklch(37.1% 0.122 288.8);
Tailwind
colors: {
  custom: {
    50: '#7a69a2',
    500: '#40307b',
    950: '#000000',
  },
}
SCSS
$custom: #40307b;
$custom-light: #7a69a2;
$custom-dark: #000000;
JSON
{
  "hex": "#40307b",
  "rgb": {
    "r": 64,
    "g": 48,
    "b": 123
  },
  "hsl": {
    "h": 252.8,
    "s": 43.86,
    "l": 33.529
  },
  "oklch": {
    "l": 0.37064,
    "c": 0.12206,
    "h": 288.8
  },
  "luminance": 0.04634
}

Semantic roles & 50–950 ramp

primary
#40307B
secondary
#99A95D
accent
#D454B8
background
#F7F6FA
surface
#EEEBF3
border
#C9C6CD
text
#09060F
muted
#7B7A7F

Preview Lab

Preview with #40307B

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

Preview Lab → · Contrast checker → · Palette generator →

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