#401F98#401F98

#401F98 is a dark, vivid violet. Relative luminance 0.043; OKLCH L 37.2% C 0.180 H 286.3°. Best body text is #FFFFFF at 11.25:1 contrast (WCAG AA passes).

Color values

HEX#401F98
RGBrgb(64, 31, 152)
HSLhsl(256, 66%, 36%)
HSVhsv(256, 80%, 60%)
CMYKcmyk(57.9%, 79.6%, 0%, 40.4%)
CIE-LABlab(24.75, 45.90, -60.02)
CIE-LCHlch(24.75, 75.56, 307.40°)
OKLaboklab(37.21% 0.0504 -0.1728)
OKLCHoklch(37.21% 0.18 286.3)
XYZxyz(8.2701, 4.3365, 30.1009)
Luminance0.0434 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401F98 #77981F
analogous
#1F3A98 #401F98 #7C1F98
triadic
#401F98 #98401F #1F9840
tetradic
#401F98 #981F3A #77981F #1F987C
square
#401F98 #981F3A #77981F #1F987C
split-complementary
#401F98 #987C1F #3A981F
monochromatic
#150A32 #2B1565 #401F98 #5529CB #7A55DC

Accessibility & contrast

On white

11.25
#401F98 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.87
#401F98 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401F98
11.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401F98#FFFFFF#000000##FFFFFF
##401F981.0011.251.8711.25
#FFFFFF11.251.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E9B
Deuteranopia (green-blind)
#003796
Tritanopia (blue-blind)
#14425B
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #401f98;
/* rgb */ color: rgb(64, 31, 152);
/* oklch */ color: oklch(37.2% 0.180 286.3);
Tailwind
colors: {
  custom: {
    50: '#805fb7',
    500: '#401f98',
    950: '#000000',
  },
}
SCSS
$custom: #401f98;
$custom-light: #805fb7;
$custom-dark: #000000;
JSON
{
  "hex": "#401f98",
  "rgb": {
    "r": 64,
    "g": 31,
    "b": 152
  },
  "hsl": {
    "h": 256.364,
    "s": 66.12,
    "l": 35.882
  },
  "oklch": {
    "l": 0.37206,
    "c": 0.18005,
    "h": 286.3
  },
  "luminance": 0.04337
}

Semantic roles & 50–950 ramp

primary
#401F98
secondary
#A2C053
accent
#E93FBB
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #401F98

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

Preview Lab → · Contrast checker → · Palette generator →

#401F98 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva