#402875#402875

#402875 is a dark, vivid violet. Relative luminance 0.039; OKLCH L 35.2% C 0.126 H 293.2°. Best body text is #FFFFFF at 11.81:1 contrast (WCAG AA passes).

Color values

HEX#402875
RGBrgb(64, 40, 117)
HSLhsl(259, 49%, 31%)
HSVhsv(259, 66%, 46%)
CMYKcmyk(45.3%, 65.8%, 0%, 54.1%)
CIE-LABlab(23.31, 30.56, -40.46)
CIE-LCHlch(23.31, 50.70, 307.07°)
OKLaboklab(35.2% 0.0495 -0.1155)
OKLCHoklch(35.2% 0.126 293.2)
XYZxyz(6.0832, 3.8918, 17.2568)
Luminance0.0389 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402875 #5D7528
analogous
#283675 #402875 #662875
triadic
#402875 #754028 #287540
tetradic
#402875 #752836 #5D7528 #287566
square
#402875 #752836 #5D7528 #287566
split-complementary
#402875 #756628 #367528
monochromatic
#0E091A #271847 #402875 #5938A3 #7653C4

Accessibility & contrast

On white

11.81
#402875 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.78
#402875 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402875
11.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402875#FFFFFF#000000##FFFFFF
##4028751.0011.811.7811.81
#FFFFFF11.811.0021.001.00
#0000001.7821.001.0021.00
##FFFFFF11.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003877
Deuteranopia (green-blind)
#003673
Tritanopia (blue-blind)
#313A4A
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #402875;
/* rgb */ color: rgb(64, 40, 117);
/* oklch */ color: oklch(35.2% 0.126 293.2);
Tailwind
colors: {
  custom: {
    50: '#79639d',
    500: '#402875',
    950: '#000000',
  },
}
SCSS
$custom: #402875;
$custom-light: #79639d;
$custom-dark: #000000;
JSON
{
  "hex": "#402875",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 117
  },
  "hsl": {
    "h": 258.701,
    "s": 49.045,
    "l": 30.784
  },
  "oklch": {
    "l": 0.35199,
    "c": 0.12567,
    "h": 293.2
  },
  "luminance": 0.03892
}

Semantic roles & 50–950 ramp

primary
#402875
secondary
#8CA752
accent
#D94FAE
background
#F7F6F9
surface
#EEEBF2
border
#C9C6CC
text
#09050E
muted
#7B7A7E

Preview Lab

Preview with #402875

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

Preview Lab → · Contrast checker → · Palette generator →

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