#40229B#40229B

#40229B is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.9% C 0.181 H 285.2°. Best body text is #FFFFFF at 10.94:1 contrast (WCAG AA passes).

Color values

HEX#40229B
RGBrgb(64, 34, 155)
HSLhsl(255, 64%, 37%)
HSVhsv(255, 78%, 61%)
CMYKcmyk(58.7%, 78.1%, 0%, 39.2%)
CIE-LABlab(25.56, 45.32, -60.53)
CIE-LCHlch(25.56, 75.62, 306.83°)
OKLaboklab(37.86% 0.0474 -0.1744)
OKLCHoklch(37.86% 0.181 285.2)
XYZxyz(8.6010, 4.6001, 31.4387)
Luminance0.0460 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40229B #7D9B22
analogous
#22419B #40229B #7D229B
triadic
#40229B #9B4022 #229B40
tetradic
#40229B #9B2241 #7D9B22 #229B7D
square
#40229B #9B2241 #7D9B22 #229B7D
split-complementary
#40229B #9B7D22 #419B22
monochromatic
#170C37 #2B1769 #40229B #552DCD #7C5CDB

Accessibility & contrast

On white

10.94
#40229B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#40229B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40229B
10.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40229B#FFFFFF#000000##FFFFFF
##40229B1.0010.941.9210.94
#FFFFFF10.941.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00409E
Deuteranopia (green-blind)
#003999
Tritanopia (blue-blind)
#0E455E
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #40229b;
/* rgb */ color: rgb(64, 34, 155);
/* oklch */ color: oklch(37.9% 0.181 285.2);
Tailwind
colors: {
  custom: {
    50: '#8061ba',
    500: '#40229b',
    950: '#000000',
  },
}
SCSS
$custom: #40229b;
$custom-light: #8061ba;
$custom-dark: #000000;
JSON
{
  "hex": "#40229b",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 155
  },
  "hsl": {
    "h": 254.876,
    "s": 64.021,
    "l": 37.059
  },
  "oklch": {
    "l": 0.37862,
    "c": 0.1807,
    "h": 285.2
  },
  "luminance": 0.04601
}

Semantic roles & 50–950 ramp

primary
#40229B
secondary
#A6C059
accent
#E741BE
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0512
muted
#7C7981

Preview Lab

Preview with #40229B

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

Preview Lab → · Contrast checker → · Palette generator →

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