#40299A#40299A

#40299A is a dark, vivid violet. Relative luminance 0.050; OKLCH L 38.7% C 0.172 H 284.3°. Best body text is #FFFFFF at 10.49:1 contrast (WCAG AA passes).

Color values

HEX#40299A
RGBrgb(64, 41, 154)
HSLhsl(252, 58%, 38%)
HSVhsv(252, 73%, 60%)
CMYKcmyk(58.4%, 73.4%, 0%, 39.6%)
CIE-LABlab(26.76, 41.36, -57.95)
CIE-LCHlch(26.76, 71.20, 305.52°)
OKLaboklab(38.67% 0.0424 -0.1669)
OKLCHoklch(38.67% 0.172 284.3)
XYZxyz(8.7382, 5.0084, 31.0719)
Luminance0.0501 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40299A #839A29
analogous
#294B9A #40299A #78299A
triadic
#40299A #9A4029 #299A40
tetradic
#40299A #9A294B #839A29 #299A78
square
#40299A #9A294B #839A29 #299A78
split-complementary
#40299A #9A7829 #4B9A29
monochromatic
#180F39 #2C1C6A #40299A #5437CA #7E67D7

Accessibility & contrast

On white

10.49
#40299A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.00
#40299A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40299A
10.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40299A#FFFFFF#000000##FFFFFF
##40299A1.0010.492.0010.49
#FFFFFF10.491.0021.001.00
#0000002.0021.001.0021.00
##FFFFFF10.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00439D
Deuteranopia (green-blind)
#003C98
Tritanopia (blue-blind)
#0F485F
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #40299a;
/* rgb */ color: rgb(64, 41, 154);
/* oklch */ color: oklch(38.7% 0.172 284.3);
Tailwind
colors: {
  custom: {
    50: '#7f65b9',
    500: '#40299a',
    950: '#000000',
  },
}
SCSS
$custom: #40299a;
$custom-light: #7f65b9;
$custom-dark: #000000;
JSON
{
  "hex": "#40299a",
  "rgb": {
    "r": 64,
    "g": 41,
    "b": 154
  },
  "hsl": {
    "h": 252.212,
    "s": 57.949,
    "l": 38.235
  },
  "oklch": {
    "l": 0.38674,
    "c": 0.17219,
    "h": 284.3
  },
  "luminance": 0.05009
}

Semantic roles & 50–950 ramp

primary
#40299A
secondary
#AABD62
accent
#E147C2
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #40299A

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

Preview Lab → · Contrast checker → · Palette generator →

#40299A Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva