#40126A#40126A

#40126A is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.3% C 0.141 H 302.3°. Best body text is #FFFFFF at 13.88:1 contrast (WCAG AA passes).

Color values

HEX#40126A
RGBrgb(64, 18, 106)
HSLhsl(271, 71%, 24%)
HSVhsv(271, 83%, 42%)
CMYKcmyk(39.6%, 83%, 0%, 58.4%)
CIE-LABlab(18.20, 39.07, -41.66)
CIE-LCHlch(18.20, 57.11, 313.16°)
OKLaboklab(31.26% 0.0752 -0.1189)
OKLCHoklch(31.26% 0.141 302.3)
XYZxyz(4.9316, 2.5632, 13.8678)
Luminance0.0256 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40126A #3C6A12
analogous
#14126A #40126A #6A1268
triadic
#40126A #6A4012 #126A40
tetradic
#40126A #6A1412 #3C6A12 #12686A
square
#40126A #6A1412 #3C6A12 #12686A
split-complementary
#40126A #686A12 #126A14
monochromatic
#10041A #200936 #40126A #601B9E #7F24D3

Accessibility & contrast

On white

13.88
#40126A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.51
#40126A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40126A
13.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40126A#FFFFFF#000000##FFFFFF
##40126A1.0013.881.5113.88
#FFFFFF13.881.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C6C
Deuteranopia (green-blind)
#002C68
Tritanopia (blue-blind)
#372A3E
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #40126a;
/* rgb */ color: rgb(64, 18, 106);
/* oklch */ color: oklch(31.3% 0.141 302.3);
Tailwind
colors: {
  custom: {
    50: '#7a5695',
    500: '#40126a',
    950: '#000000',
  },
}
SCSS
$custom: #40126a;
$custom-light: #7a5695;
$custom-dark: #000000;
JSON
{
  "hex": "#40126a",
  "rgb": {
    "r": 64,
    "g": 18,
    "b": 106
  },
  "hsl": {
    "h": 271.364,
    "s": 70.968,
    "l": 24.314
  },
  "oklch": {
    "l": 0.31265,
    "c": 0.14072,
    "h": 302.3
  },
  "luminance": 0.02563
}

Semantic roles & 50–950 ramp

primary
#40126A
secondary
#69A236
accent
#EE3A90
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A030D
muted
#7C787E

Preview Lab

Preview with #40126A

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

Preview Lab → · Contrast checker → · Palette generator →

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