#40299C#40299C

#40299C is a dark, vivid violet. Relative luminance 0.051; OKLCH L 38.9% C 0.175 H 283.9°. Best body text is #FFFFFF at 10.42:1 contrast (WCAG AA passes).

Color values

HEX#40299C
RGBrgb(64, 41, 156)
HSLhsl(252, 58%, 39%)
HSVhsv(252, 74%, 61%)
CMYKcmyk(59%, 73.7%, 0%, 38.8%)
CIE-LABlab(26.95, 41.98, -58.86)
CIE-LCHlch(26.95, 72.30, 305.49°)
OKLaboklab(38.87% 0.042 -0.1695)
OKLCHoklch(38.87% 0.175 283.9)
XYZxyz(8.9062, 5.0756, 31.9564)
Luminance0.0508 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40299C #859C29
analogous
#294B9C #40299C #79299C
triadic
#40299C #9C4029 #299C40
tetradic
#40299C #9C294B #859C29 #299C79
square
#40299C #9C294B #859C29 #299C79
split-complementary
#40299C #9C7929 #4B9C29
monochromatic
#18103B #2C1C6C #40299C #5538CB #7E68D7

Accessibility & contrast

On white

10.42
#40299C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.02
#40299C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40299C
10.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40299C#FFFFFF#000000##FFFFFF
##40299C1.0010.422.0210.42
#FFFFFF10.421.0021.001.00
#0000002.0221.001.0021.00
##FFFFFF10.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00439F
Deuteranopia (green-blind)
#003C9A
Tritanopia (blue-blind)
#0B4860
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #40299c;
/* rgb */ color: rgb(64, 41, 156);
/* oklch */ color: oklch(38.9% 0.175 283.9);
Tailwind
colors: {
  custom: {
    50: '#8065ba',
    500: '#40299c',
    950: '#000000',
  },
}
SCSS
$custom: #40299c;
$custom-light: #8065ba;
$custom-dark: #000000;
JSON
{
  "hex": "#40299c",
  "rgb": {
    "r": 64,
    "g": 41,
    "b": 156
  },
  "hsl": {
    "h": 252,
    "s": 58.376,
    "l": 38.627
  },
  "oklch": {
    "l": 0.38867,
    "c": 0.17466,
    "h": 283.9
  },
  "luminance": 0.05076
}

Semantic roles & 50–950 ramp

primary
#40299C
secondary
#ACBE63
accent
#E246C3
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #40299C

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

Preview Lab → · Contrast checker → · Palette generator →

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