#40308D#40308D

#40308D is a dark, vivid violet. Relative luminance 0.051; OKLCH L 38.6% C 0.147 H 285.1°. Best body text is #FFFFFF at 10.37:1 contrast (WCAG AA passes).

Color values

HEX#40308D
RGBrgb(64, 48, 141)
HSLhsl(250, 49%, 37%)
HSVhsv(250, 66%, 55%)
CMYKcmyk(54.6%, 66%, 0%, 44.7%)
CIE-LABlab(27.09, 33.18, -49.41)
CIE-LCHlch(27.09, 59.51, 303.88°)
OKLaboklab(38.56% 0.0382 -0.1418)
OKLCHoklch(38.56% 0.147 285.1)
XYZxyz(7.9776, 5.1265, 25.7633)
Luminance0.0513 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40308D #7D8D30
analogous
#304E8D #40308D #6F308D
triadic
#40308D #8D4030 #308D40
tetradic
#40308D #8D304E #7D8D30 #308D6F
square
#40308D #8D304E #7D8D30 #308D6F
split-complementary
#40308D #8D6F30 #4E8D30
monochromatic
#171132 #2B205F #40308D #5540BB #7C6BCD

Accessibility & contrast

On white

10.37
#40308D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.03
#40308D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40308D
10.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40308D#FFFFFF#000000##FFFFFF
##40308D1.0010.372.0310.37
#FFFFFF10.371.0021.001.00
#0000002.0321.001.0021.00
##FFFFFF10.371.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #40308d;
/* rgb */ color: rgb(64, 48, 141);
/* oklch */ color: oklch(38.6% 0.147 285.1);
Tailwind
colors: {
  custom: {
    50: '#7d69af',
    500: '#40308d',
    950: '#000000',
  },
}
SCSS
$custom: #40308d;
$custom-light: #7d69af;
$custom-dark: #000000;
JSON
{
  "hex": "#40308d",
  "rgb": {
    "r": 64,
    "g": 48,
    "b": 141
  },
  "hsl": {
    "h": 250.323,
    "s": 49.206,
    "l": 37.059
  },
  "oklch": {
    "l": 0.38557,
    "c": 0.14687,
    "h": 285.1
  },
  "luminance": 0.05127
}

Semantic roles & 50–950 ramp

primary
#40308D
secondary
#A6B465
accent
#D94FC1
background
#F7F6FA
surface
#EEEBF5
border
#C9C6CF
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #40308D

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

Preview Lab → · Contrast checker → · Palette generator →

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