#401271#401271

#401271 is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.9% C 0.148 H 299.5°. Best body text is #FFFFFF at 13.61:1 contrast (WCAG AA passes).

Color values

HEX#401271
RGBrgb(64, 18, 113)
HSLhsl(269, 73%, 26%)
HSVhsv(269, 84%, 44%)
CMYKcmyk(43.4%, 84.1%, 0%, 55.7%)
CIE-LABlab(18.86, 40.87, -45.13)
CIE-LCHlch(18.86, 60.89, 312.17°)
OKLaboklab(31.93% 0.073 -0.1291)
OKLCHoklch(31.93% 0.148 299.5)
XYZxyz(5.3105, 2.7148, 15.8638)
Luminance0.0272 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401271 #437112
analogous
#121371 #401271 #6F1271
triadic
#401271 #714012 #127140
tetradic
#401271 #711213 #437112 #12716F
square
#401271 #711213 #437112 #12716F
split-complementary
#401271 #716F12 #137112
monochromatic
#0F041A #220A3C #401271 #5E1AA6 #7C23DB

Accessibility & contrast

On white

13.61
#401271 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#401271 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401271
13.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401271#FFFFFF#000000##FFFFFF
##4012711.0013.611.5413.61
#FFFFFF13.611.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E74
Deuteranopia (green-blind)
#002D6F
Tritanopia (blue-blind)
#342D42
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #401271;
/* rgb */ color: rgb(64, 18, 113);
/* oklch */ color: oklch(31.9% 0.148 299.5);
Tailwind
colors: {
  custom: {
    50: '#7b579b',
    500: '#401271',
    950: '#000000',
  },
}
SCSS
$custom: #401271;
$custom-light: #7b579b;
$custom-dark: #000000;
JSON
{
  "hex": "#401271",
  "rgb": {
    "r": 64,
    "g": 18,
    "b": 113
  },
  "hsl": {
    "h": 269.053,
    "s": 72.519,
    "l": 25.686
  },
  "oklch": {
    "l": 0.31929,
    "c": 0.14831,
    "h": 299.5
  },
  "luminance": 0.02715
}

Semantic roles & 50–950 ramp

primary
#401271
secondary
#71A837
accent
#EF3997
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A030E
muted
#7C787E

Preview Lab

Preview with #401271

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

Preview Lab → · Contrast checker → · Palette generator →

#401271 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva