#40299F#40299F

#40299F is a dark, vivid violet. Relative luminance 0.052; OKLCH L 39.2% C 0.178 H 283.4°. Best body text is #FFFFFF at 10.32:1 contrast (WCAG AA passes).

Color values

HEX#40299F
RGBrgb(64, 41, 159)
HSLhsl(252, 59%, 39%)
HSVhsv(252, 74%, 62%)
CMYKcmyk(59.7%, 74.2%, 0%, 37.6%)
CIE-LABlab(27.24, 42.90, -60.22)
CIE-LCHlch(27.24, 73.93, 305.47°)
OKLaboklab(39.16% 0.0413 -0.1735)
OKLCHoklch(39.16% 0.178 283.4)
XYZxyz(9.1634, 5.1785, 33.3108)
Luminance0.0518 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40299F #889F29
analogous
#294D9F #40299F #7B299F
triadic
#40299F #9F4029 #299F40
tetradic
#40299F #9F294D #889F29 #299F7B
square
#40299F #9F294D #889F29 #299F7B
split-complementary
#40299F #9F7B29 #4D9F29
monochromatic
#19103E #2C1C6E #40299F #5639CC #7F6AD9

Accessibility & contrast

On white

10.32
#40299F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.04
#40299F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40299F
10.32:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40299F#FFFFFF#000000##FFFFFF
##40299F1.0010.322.0410.32
#FFFFFF10.321.0021.001.00
#0000002.0421.001.0021.00
##FFFFFF10.321.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0044A2
Deuteranopia (green-blind)
#003C9D
Tritanopia (blue-blind)
#024A62
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #40299f;
/* rgb */ color: rgb(64, 41, 159);
/* oklch */ color: oklch(39.2% 0.178 283.4);
Tailwind
colors: {
  custom: {
    50: '#8065bc',
    500: '#40299f',
    950: '#000000',
  },
}
SCSS
$custom: #40299f;
$custom-light: #8065bc;
$custom-dark: #000000;
JSON
{
  "hex": "#40299f",
  "rgb": {
    "r": 64,
    "g": 41,
    "b": 159
  },
  "hsl": {
    "h": 251.695,
    "s": 59,
    "l": 39.216
  },
  "oklch": {
    "l": 0.39159,
    "c": 0.17835,
    "h": 283.4
  },
  "luminance": 0.05179
}

Semantic roles & 50–950 ramp

primary
#40299F
secondary
#ADBF65
accent
#E246C4
background
#F8F6FB
surface
#EFEBF7
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #40299F

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

Preview Lab → · Contrast checker → · Palette generator →

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