#40238D#40238D

#40238D is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.6% C 0.163 H 288.0°. Best body text is #FFFFFF at 11.39:1 contrast (WCAG AA passes).

Color values

HEX#40238D
RGBrgb(64, 35, 141)
HSLhsl(256, 60%, 35%)
HSVhsv(256, 75%, 55%)
CMYKcmyk(54.6%, 75.2%, 0%, 44.7%)
CIE-LABlab(24.37, 40.66, -53.86)
CIE-LCHlch(24.37, 67.48, 307.05°)
OKLaboklab(36.61% 0.0504 -0.1548)
OKLCHoklch(36.61% 0.163 288)
XYZxyz(7.5217, 4.2148, 25.6113)
Luminance0.0421 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40238D #708D23
analogous
#233B8D #40238D #75238D
triadic
#40238D #8D4023 #238D40
tetradic
#40238D #8D233B #708D23 #238D75
square
#40238D #8D233B #708D23 #238D75
split-complementary
#40238D #8D7523 #3B8D23
monochromatic
#130B2B #2A175C #40238D #562FBE #7855D5

Accessibility & contrast

On white

11.39
#40238D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.84
#40238D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40238D
11.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40238D#FFFFFF#000000##FFFFFF
##40238D1.0011.391.8411.39
#FFFFFF11.391.0021.001.00
#0000001.8421.001.0021.00
##FFFFFF11.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C90
Deuteranopia (green-blind)
#00378B
Tritanopia (blue-blind)
#214056
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #40238d;
/* rgb */ color: rgb(64, 35, 141);
/* oklch */ color: oklch(36.6% 0.163 288.0);
Tailwind
colors: {
  custom: {
    50: '#7e61af',
    500: '#40238d',
    950: '#000000',
  },
}
SCSS
$custom: #40238d;
$custom-light: #7e61af;
$custom-dark: #000000;
JSON
{
  "hex": "#40238d",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 141
  },
  "hsl": {
    "h": 256.415,
    "s": 60.227,
    "l": 34.51
  },
  "oklch": {
    "l": 0.36606,
    "c": 0.16286,
    "h": 288
  },
  "luminance": 0.04215
}

Semantic roles & 50–950 ramp

primary
#40238D
secondary
#9DB953
accent
#E344B8
background
#F8F5FA
surface
#EFEAF5
border
#CAC6CF
text
#0B0510
muted
#7C797F

Preview Lab

Preview with #40238D

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

Preview Lab → · Contrast checker → · Palette generator →

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