#40227D#40227D

#40227D is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.0% C 0.144 H 292.4°. Best body text is #FFFFFF at 12.05:1 contrast (WCAG AA passes).

Color values

HEX#40227D
RGBrgb(64, 34, 125)
HSLhsl(260, 57%, 31%)
HSVhsv(260, 73%, 49%)
CMYKcmyk(48.8%, 72.8%, 0%, 51%)
CIE-LABlab(22.70, 36.45, -46.54)
CIE-LCHlch(22.70, 59.11, 308.07°)
OKLaboklab(34.97% 0.055 -0.1334)
OKLCHoklch(34.97% 0.144 292.4)
XYZxyz(6.3870, 3.7145, 19.7785)
Luminance0.0372 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40227D #5F7D22
analogous
#22317D #40227D #6D227D
triadic
#40227D #7D4022 #227D40
tetradic
#40227D #7D2231 #5F7D22 #227D6D
square
#40227D #7D2231 #5F7D22 #227D6D
split-complementary
#40227D #7D6D22 #317D22
monochromatic
#0F081D #27154D #40227D #592FAD #764BCE

Accessibility & contrast

On white

12.05
#40227D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#40227D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40227D
12.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40227D#FFFFFF#000000##FFFFFF
##40227D1.0012.051.7412.05
#FFFFFF12.051.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003780
Deuteranopia (green-blind)
#00347B
Tritanopia (blue-blind)
#2D394D
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40227d;
/* rgb */ color: rgb(64, 34, 125);
/* oklch */ color: oklch(35.0% 0.144 292.4);
Tailwind
colors: {
  custom: {
    50: '#7b60a3',
    500: '#40227d',
    950: '#000000',
  },
}
SCSS
$custom: #40227d;
$custom-light: #7b60a3;
$custom-dark: #000000;
JSON
{
  "hex": "#40227d",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 125
  },
  "hsl": {
    "h": 259.78,
    "s": 57.233,
    "l": 31.176
  },
  "oklch": {
    "l": 0.34973,
    "c": 0.14427,
    "h": 292.4
  },
  "luminance": 0.03715
}

Semantic roles & 50–950 ramp

primary
#40227D
secondary
#8FB04B
accent
#E047AE
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40227D

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

Preview Lab → · Contrast checker → · Palette generator →

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