#40308B#40308B

#40308B is a dark, vivid violet. Relative luminance 0.051; OKLCH L 38.4% C 0.144 H 285.4°. Best body text is #FFFFFF at 10.43:1 contrast (WCAG AA passes).

Color values

HEX#40308B
RGBrgb(64, 48, 139)
HSLhsl(251, 49%, 37%)
HSVhsv(251, 65%, 55%)
CMYKcmyk(54%, 65.5%, 0%, 45.5%)
CIE-LABlab(26.93, 32.53, -48.44)
CIE-LCHlch(26.93, 58.35, 303.89°)
OKLaboklab(38.38% 0.0384 -0.139)
OKLCHoklch(38.38% 0.144 285.4)
XYZxyz(7.8301, 5.0676, 24.9866)
Luminance0.0507 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40308B #7B8B30
analogous
#304E8B #40308B #6E308B
triadic
#40308B #8B4030 #308B40
tetradic
#40308B #8B304E #7B8B30 #308B6E
square
#40308B #8B304E #7B8B30 #308B6E
split-complementary
#40308B #8B6E30 #4E8B30
monochromatic
#161130 #2B205E #40308B #5540B8 #7B6ACC

Accessibility & contrast

On white

10.43
#40308B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.01
#40308B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40308B
10.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40308B#FFFFFF#000000##FFFFFF
##40308B1.0010.432.0110.43
#FFFFFF10.431.0021.001.00
#0000002.0121.001.0021.00
##FFFFFF10.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00428E
Deuteranopia (green-blind)
#003D89
Tritanopia (blue-blind)
#224659
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #40308b;
/* rgb */ color: rgb(64, 48, 139);
/* oklch */ color: oklch(38.4% 0.144 285.4);
Tailwind
colors: {
  custom: {
    50: '#7c69ae',
    500: '#40308b',
    950: '#000000',
  },
}
SCSS
$custom: #40308b;
$custom-light: #7c69ae;
$custom-dark: #000000;
JSON
{
  "hex": "#40308b",
  "rgb": {
    "r": 64,
    "g": 48,
    "b": 139
  },
  "hsl": {
    "h": 250.549,
    "s": 48.663,
    "l": 36.667
  },
  "oklch": {
    "l": 0.38384,
    "c": 0.14417,
    "h": 285.4
  },
  "luminance": 0.05068
}

Semantic roles & 50–950 ramp

primary
#40308B
secondary
#A5B364
accent
#D850C0
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #40308B

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

Preview Lab → · Contrast checker → · Palette generator →

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