#40238F#40238F

#40238F is a dark, vivid violet. Relative luminance 0.043; OKLCH L 36.8% C 0.165 H 287.6°. Best body text is #FFFFFF at 11.32:1 contrast (WCAG AA passes).

Color values

HEX#40238F
RGBrgb(64, 35, 143)
HSLhsl(256, 61%, 35%)
HSVhsv(256, 76%, 56%)
CMYKcmyk(55.2%, 75.5%, 0%, 43.9%)
CIE-LABlab(24.56, 41.26, -54.79)
CIE-LCHlch(24.56, 68.58, 306.98°)
OKLaboklab(36.8% 0.0499 -0.1576)
OKLCHoklch(36.8% 0.165 287.6)
XYZxyz(7.6718, 4.2748, 26.4022)
Luminance0.0428 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40238F #728F23
analogous
#233C8F #40238F #76238F
triadic
#40238F #8F4023 #238F40
tetradic
#40238F #8F233C #728F23 #238F76
square
#40238F #8F233C #728F23 #238F76
split-complementary
#40238F #8F7623 #3C8F23
monochromatic
#140B2D #2A175E #40238F #562FC0 #7957D6

Accessibility & contrast

On white

11.32
#40238F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.86
#40238F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40238F
11.32:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40238F#FFFFFF#000000##FFFFFF
##40238F1.0011.321.8611.32
#FFFFFF11.321.0021.001.00
#0000001.8621.001.0021.00
##FFFFFF11.321.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D92
Deuteranopia (green-blind)
#00378D
Tritanopia (blue-blind)
#1F4157
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #40238f;
/* rgb */ color: rgb(64, 35, 143);
/* oklch */ color: oklch(36.8% 0.165 287.6);
Tailwind
colors: {
  custom: {
    50: '#7e61b1',
    500: '#40238f',
    950: '#000000',
  },
}
SCSS
$custom: #40238f;
$custom-light: #7e61b1;
$custom-dark: #000000;
JSON
{
  "hex": "#40238f",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 143
  },
  "hsl": {
    "h": 256.111,
    "s": 60.674,
    "l": 34.902
  },
  "oklch": {
    "l": 0.36799,
    "c": 0.16529,
    "h": 287.6
  },
  "luminance": 0.04275
}

Semantic roles & 50–950 ramp

primary
#40238F
secondary
#9FBA54
accent
#E444B9
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #40238F

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

Preview Lab → · Contrast checker → · Palette generator →

#40238F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva