#40227B#40227B

#40227B is a dark, vivid violet. Relative luminance 0.037; OKLCH L 34.8% C 0.142 H 293.0°. Best body text is #FFFFFF at 12.12:1 contrast (WCAG AA passes).

Color values

HEX#40227B
RGBrgb(64, 34, 123)
HSLhsl(260, 57%, 31%)
HSVhsv(260, 72%, 48%)
CMYKcmyk(48%, 72.4%, 0%, 51.8%)
CIE-LABlab(22.53, 35.86, -45.56)
CIE-LCHlch(22.53, 57.98, 308.21°)
OKLaboklab(34.79% 0.0554 -0.1305)
OKLCHoklch(34.79% 0.142 293)
XYZxyz(6.2605, 3.6639, 19.1124)
Luminance0.0366 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40227B #5D7B22
analogous
#22307B #40227B #6C227B
triadic
#40227B #7B4022 #227B40
tetradic
#40227B #7B2230 #5D7B22 #227B6C
square
#40227B #7B2230 #5D7B22 #227B6C
split-complementary
#40227B #7B6C22 #307B22
monochromatic
#0E071B #27154B #40227B #592FAB #764ACD

Accessibility & contrast

On white

12.12
#40227B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.73
#40227B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40227B
12.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40227B#FFFFFF#000000##FFFFFF
##40227B1.0012.121.7312.12
#FFFFFF12.121.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00377E
Deuteranopia (green-blind)
#003479
Tritanopia (blue-blind)
#2E384C
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40227b;
/* rgb */ color: rgb(64, 34, 123);
/* oklch */ color: oklch(34.8% 0.142 293.0);
Tailwind
colors: {
  custom: {
    50: '#7b60a2',
    500: '#40227b',
    950: '#000000',
  },
}
SCSS
$custom: #40227b;
$custom-light: #7b60a2;
$custom-dark: #000000;
JSON
{
  "hex": "#40227b",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 123
  },
  "hsl": {
    "h": 260.225,
    "s": 56.688,
    "l": 30.784
  },
  "oklch": {
    "l": 0.34792,
    "c": 0.14175,
    "h": 293
  },
  "luminance": 0.03664
}

Semantic roles & 50–950 ramp

primary
#40227B
secondary
#8CAE4B
accent
#E048AD
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40227B

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

Preview Lab → · Contrast checker → · Palette generator →

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