#40226F#40226F

#40226F is a dark, vivid violet. Relative luminance 0.034; OKLCH L 33.7% C 0.127 H 297.0°. Best body text is #FFFFFF at 12.53:1 contrast (WCAG AA passes).

Color values

HEX#40226F
RGBrgb(64, 34, 111)
HSLhsl(263, 53%, 28%)
HSVhsv(263, 69%, 44%)
CMYKcmyk(42.3%, 69.4%, 0%, 56.5%)
CIE-LABlab(21.51, 32.35, -39.52)
CIE-LCHlch(21.51, 51.07, 309.30°)
OKLaboklab(33.75% 0.0574 -0.1127)
OKLCHoklch(33.75% 0.127 297)
XYZxyz(5.5549, 3.3816, 15.3959)
Luminance0.0338 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40226F #516F22
analogous
#222A6F #40226F #66226F
triadic
#40226F #6F4022 #226F40
tetradic
#40226F #6F222A #516F22 #226F66
square
#40226F #6F222A #516F22 #226F66
split-complementary
#40226F #6F6622 #2A6F22
monochromatic
#0E0717 #251440 #40226F #5B309E #7745C6

Accessibility & contrast

On white

12.53
#40226F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#40226F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40226F
12.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40226F#FFFFFF#000000##FFFFFF
##40226F1.0012.531.6812.53
#FFFFFF12.531.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003471
Deuteranopia (green-blind)
#00336D
Tritanopia (blue-blind)
#343445
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #40226f;
/* rgb */ color: rgb(64, 34, 111);
/* oklch */ color: oklch(33.7% 0.127 297.0);
Tailwind
colors: {
  custom: {
    50: '#795f99',
    500: '#40226f',
    950: '#000000',
  },
}
SCSS
$custom: #40226f;
$custom-light: #795f99;
$custom-dark: #000000;
JSON
{
  "hex": "#40226f",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 111
  },
  "hsl": {
    "h": 263.377,
    "s": 53.103,
    "l": 28.431
  },
  "oklch": {
    "l": 0.33747,
    "c": 0.1265,
    "h": 297
  },
  "luminance": 0.03382
}

Semantic roles & 50–950 ramp

primary
#40226F
secondary
#80A24A
accent
#DD4BA4
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#09050E
muted
#7B797E

Preview Lab

Preview with #40226F

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

Preview Lab → · Contrast checker → · Palette generator →

#40226F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva