#401158#401158

#401158 is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.6% C 0.122 H 311.3°. Best body text is #FFFFFF at 14.59:1 contrast (WCAG AA passes).

Color values

HEX#401158
RGBrgb(64, 17, 88)
HSLhsl(280, 68%, 21%)
HSVhsv(280, 81%, 35%)
CMYKcmyk(27.3%, 80.7%, 0%, 65.5%)
CIE-LABlab(16.48, 35.00, -32.51)
CIE-LCHlch(16.48, 47.77, 317.11°)
OKLaboklab(29.57% 0.0807 -0.0921)
OKLCHoklch(29.57% 0.122 311.3)
XYZxyz(4.0759, 2.1956, 9.4397)
Luminance0.0220 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401158 #295811
analogous
#1C1158 #401158 #58114C
triadic
#401158 #584011 #115840
tetradic
#401158 #581C11 #295811 #114C58
square
#401158 #581C11 #295811 #114C58
split-complementary
#401158 #4C5811 #11581C
monochromatic
#13051A #1B0725 #401158 #651B8B #8B25BF

Accessibility & contrast

On white

14.59
#401158 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.44
#401158 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401158
14.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401158#FFFFFF#000000##FFFFFF
##4011581.0014.591.4414.59
#FFFFFF14.591.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00275A
Deuteranopia (green-blind)
#052A57
Tritanopia (blue-blind)
#3D2234
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #401158;
/* rgb */ color: rgb(64, 17, 88);
/* oklch */ color: oklch(29.6% 0.122 311.3);
Tailwind
colors: {
  custom: {
    50: '#785588',
    500: '#401158',
    950: '#000000',
  },
}
SCSS
$custom: #401158;
$custom-light: #785588;
$custom-dark: #000000;
JSON
{
  "hex": "#401158",
  "rgb": {
    "r": 64,
    "g": 17,
    "b": 88
  },
  "hsl": {
    "h": 279.718,
    "s": 67.619,
    "l": 20.588
  },
  "oklch": {
    "l": 0.29567,
    "c": 0.12244,
    "h": 311.3
  },
  "luminance": 0.02195
}

Semantic roles & 50–950 ramp

primary
#401158
secondary
#539134
accent
#EA3D78
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09030B
muted
#7B787C

Preview Lab

Preview with #401158

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

Preview Lab → · Contrast checker → · Palette generator →

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