#40238E#40238E

#40238E is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.7% C 0.164 H 287.8°. Best body text is #FFFFFF at 11.36:1 contrast (WCAG AA passes).

Color values

HEX#40238E
RGBrgb(64, 35, 142)
HSLhsl(256, 60%, 35%)
HSVhsv(256, 75%, 56%)
CMYKcmyk(54.9%, 75.4%, 0%, 44.3%)
CIE-LABlab(24.46, 40.96, -54.32)
CIE-LCHlch(24.46, 68.03, 307.02°)
OKLaboklab(36.7% 0.0502 -0.1562)
OKLCHoklch(36.7% 0.164 287.8)
XYZxyz(7.5964, 4.2447, 26.0050)
Luminance0.0425 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40238E #718E23
analogous
#233B8E #40238E #76238E
triadic
#40238E #8E4023 #238E40
tetradic
#40238E #8E233B #718E23 #238E76
square
#40238E #8E233B #718E23 #238E76
split-complementary
#40238E #8E7623 #3B8E23
monochromatic
#140B2C #2A175D #40238E #562FBF #7956D5

Accessibility & contrast

On white

11.36
#40238E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.85
#40238E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40238E
11.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40238E#FFFFFF#000000##FFFFFF
##40238E1.0011.361.8511.36
#FFFFFF11.361.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D91
Deuteranopia (green-blind)
#00378C
Tritanopia (blue-blind)
#204056
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #40238e;
/* rgb */ color: rgb(64, 35, 142);
/* oklch */ color: oklch(36.7% 0.164 287.8);
Tailwind
colors: {
  custom: {
    50: '#7e61b0',
    500: '#40238e',
    950: '#000000',
  },
}
SCSS
$custom: #40238e;
$custom-light: #7e61b0;
$custom-dark: #000000;
JSON
{
  "hex": "#40238e",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 142
  },
  "hsl": {
    "h": 256.262,
    "s": 60.452,
    "l": 34.706
  },
  "oklch": {
    "l": 0.36703,
    "c": 0.16407,
    "h": 287.8
  },
  "luminance": 0.04245
}

Semantic roles & 50–950 ramp

primary
#40238E
secondary
#9EB953
accent
#E444B8
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #40238E

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

Preview Lab → · Contrast checker → · Palette generator →

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