#40308C#40308C

#40308C is a dark, vivid violet. Relative luminance 0.051; OKLCH L 38.5% C 0.146 H 285.3°. Best body text is #FFFFFF at 10.40:1 contrast (WCAG AA passes).

Color values

HEX#40308C
RGBrgb(64, 48, 140)
HSLhsl(250, 49%, 37%)
HSVhsv(250, 66%, 55%)
CMYKcmyk(54.3%, 65.7%, 0%, 45.1%)
CIE-LABlab(27.01, 32.85, -48.92)
CIE-LCHlch(27.01, 58.93, 303.88°)
OKLaboklab(38.47% 0.0383 -0.1404)
OKLCHoklch(38.47% 0.146 285.3)
XYZxyz(7.9035, 5.0969, 25.3732)
Luminance0.0510 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40308C #7C8C30
analogous
#304E8C #40308C #6E308C
triadic
#40308C #8C4030 #308C40
tetradic
#40308C #8C304E #7C8C30 #308C6E
square
#40308C #8C304E #7C8C30 #308C6E
split-complementary
#40308C #8C6E30 #4E8C30
monochromatic
#161131 #2B205E #40308C #5540BA #7B6ACC

Accessibility & contrast

On white

10.40
#40308C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.02
#40308C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40308C
10.40:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40308C#FFFFFF#000000##FFFFFF
##40308C1.0010.402.0210.40
#FFFFFF10.401.0021.001.00
#0000002.0221.001.0021.00
##FFFFFF10.401.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00428F
Deuteranopia (green-blind)
#003D8A
Tritanopia (blue-blind)
#214759
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #40308c;
/* rgb */ color: rgb(64, 48, 140);
/* oklch */ color: oklch(38.5% 0.146 285.3);
Tailwind
colors: {
  custom: {
    50: '#7c69ae',
    500: '#40308c',
    950: '#000000',
  },
}
SCSS
$custom: #40308c;
$custom-light: #7c69ae;
$custom-dark: #000000;
JSON
{
  "hex": "#40308c",
  "rgb": {
    "r": 64,
    "g": 48,
    "b": 140
  },
  "hsl": {
    "h": 250.435,
    "s": 48.936,
    "l": 36.863
  },
  "oklch": {
    "l": 0.3847,
    "c": 0.14552,
    "h": 285.3
  },
  "luminance": 0.05097
}

Semantic roles & 50–950 ramp

primary
#40308C
secondary
#A6B364
accent
#D84FC1
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #40308C

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

Preview Lab → · Contrast checker → · Palette generator →

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