#40227E#40227E

#40227E is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.1% C 0.146 H 292.1°. Best body text is #FFFFFF at 12.01:1 contrast (WCAG AA passes).

Color values

HEX#40227E
RGBrgb(64, 34, 126)
HSLhsl(260, 58%, 31%)
HSVhsv(260, 73%, 49%)
CMYKcmyk(49.2%, 73%, 0%, 50.6%)
CIE-LABlab(22.79, 36.74, -47.02)
CIE-LCHlch(22.79, 59.68, 308.00°)
OKLaboklab(35.06% 0.0548 -0.1348)
OKLCHoklch(35.06% 0.146 292.1)
XYZxyz(6.4512, 3.7402, 20.1166)
Luminance0.0374 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40227E #607E22
analogous
#22327E #40227E #6E227E
triadic
#40227E #7E4022 #227E40
tetradic
#40227E #7E2232 #607E22 #227E6E
square
#40227E #7E2232 #607E22 #227E6E
split-complementary
#40227E #7E6E22 #327E22
monochromatic
#0F081E #28154E #40227E #582FAE #764CCF

Accessibility & contrast

On white

12.01
#40227E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#40227E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40227E
12.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40227E#FFFFFF#000000##FFFFFF
##40227E1.0012.011.7512.01
#FFFFFF12.011.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF12.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003881
Deuteranopia (green-blind)
#00357C
Tritanopia (blue-blind)
#2D3A4D
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40227e;
/* rgb */ color: rgb(64, 34, 126);
/* oklch */ color: oklch(35.1% 0.146 292.1);
Tailwind
colors: {
  custom: {
    50: '#7b60a4',
    500: '#40227e',
    950: '#000000',
  },
}
SCSS
$custom: #40227e;
$custom-light: #7b60a4;
$custom-dark: #000000;
JSON
{
  "hex": "#40227e",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 126
  },
  "hsl": {
    "h": 259.565,
    "s": 57.5,
    "l": 31.373
  },
  "oklch": {
    "l": 0.35064,
    "c": 0.14551,
    "h": 292.1
  },
  "luminance": 0.0374
}

Semantic roles & 50–950 ramp

primary
#40227E
secondary
#90B14B
accent
#E147AF
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40227E

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

Preview Lab → · Contrast checker → · Palette generator →

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