#402799#402799

#402799 is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.3% C 0.173 H 284.8°. Best body text is #FFFFFF at 10.67:1 contrast (WCAG AA passes).

Color values

HEX#402799
RGBrgb(64, 39, 153)
HSLhsl(253, 59%, 38%)
HSVhsv(253, 75%, 60%)
CMYKcmyk(58.2%, 74.5%, 0%, 40%)
CIE-LABlab(26.28, 42.14, -58.13)
CIE-LCHlch(26.28, 71.80, 305.94°)
OKLaboklab(38.3% 0.0442 -0.1674)
OKLCHoklch(38.3% 0.173 284.8)
XYZxyz(8.5879, 4.8404, 30.6126)
Luminance0.0484 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402799 #809927
analogous
#274799 #402799 #792799
triadic
#402799 #994027 #279940
tetradic
#402799 #992747 #809927 #279979
square
#402799 #992747 #809927 #279979
split-complementary
#402799 #997927 #479927
monochromatic
#170E37 #2C1B68 #402799 #5433CA #7D63D7

Accessibility & contrast

On white

10.67
#402799 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.97
#402799 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402799
10.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402799#FFFFFF#000000##FFFFFF
##4027991.0010.671.9710.67
#FFFFFF10.671.0021.001.00
#0000001.9721.001.0021.00
##FFFFFF10.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00419C
Deuteranopia (green-blind)
#003B97
Tritanopia (blue-blind)
#12465E
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #402799;
/* rgb */ color: rgb(64, 39, 153);
/* oklch */ color: oklch(38.3% 0.173 284.8);
Tailwind
colors: {
  custom: {
    50: '#7f64b8',
    500: '#402799',
    950: '#000000',
  },
}
SCSS
$custom: #402799;
$custom-light: #7f64b8;
$custom-dark: #000000;
JSON
{
  "hex": "#402799",
  "rgb": {
    "r": 64,
    "g": 39,
    "b": 153
  },
  "hsl": {
    "h": 253.158,
    "s": 59.375,
    "l": 37.647
  },
  "oklch": {
    "l": 0.38303,
    "c": 0.17315,
    "h": 284.8
  },
  "luminance": 0.04841
}

Semantic roles & 50–950 ramp

primary
#402799
secondary
#A8BD5F
accent
#E345C0
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0511
muted
#7C7A80

Preview Lab

Preview with #402799

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

Preview Lab → · Contrast checker → · Palette generator →

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