#401172#401172

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

Color values

HEX#401172
RGBrgb(64, 17, 114)
HSLhsl(269, 74%, 26%)
HSVhsv(269, 85%, 45%)
CMYKcmyk(43.9%, 85.1%, 0%, 55.3%)
CIE-LABlab(18.82, 41.53, -45.84)
CIE-LCHlch(18.82, 61.86, 312.18°)
OKLaboklab(31.93% 0.0734 -0.1312)
OKLCHoklch(31.93% 0.15 299.2)
XYZxyz(5.3513, 2.7057, 16.1566)
Luminance0.0271 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401172 #437211
analogous
#111272 #401172 #701172
triadic
#401172 #724011 #117240
tetradic
#401172 #721112 #437211 #117270
square
#401172 #721112 #437211 #117270
split-complementary
#401172 #727011 #127211
monochromatic
#0F041B #22093D #401172 #5E19A7 #7C21DD

Accessibility & contrast

On white

13.63
#401172 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #401172
13.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401172#FFFFFF#000000##FFFFFF
##4011721.0013.631.5413.63
#FFFFFF13.631.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.631.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #401172;
/* rgb */ color: rgb(64, 17, 114);
/* oklch */ color: oklch(31.9% 0.150 299.2);
Tailwind
colors: {
  custom: {
    50: '#7b569b',
    500: '#401172',
    950: '#000000',
  },
}
SCSS
$custom: #401172;
$custom-light: #7b569b;
$custom-dark: #000000;
JSON
{
  "hex": "#401172",
  "rgb": {
    "r": 64,
    "g": 17,
    "b": 114
  },
  "hsl": {
    "h": 269.072,
    "s": 74.046,
    "l": 25.686
  },
  "oklch": {
    "l": 0.31932,
    "c": 0.15034,
    "h": 299.2
  },
  "luminance": 0.02706
}

Semantic roles & 50–950 ramp

primary
#401172
secondary
#71A936
accent
#F13797
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A030E
muted
#7C787E

Preview Lab

Preview with #401172

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

Preview Lab → · Contrast checker → · Palette generator →

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