#403158#403158

#403158 is a dark, moderate violet. Relative luminance 0.040; OKLCH L 34.8% C 0.068 H 300.6°. Best body text is #FFFFFF at 11.68:1 contrast (WCAG AA passes).

Color values

HEX#403158
RGBrgb(64, 49, 88)
HSLhsl(263, 28%, 27%)
HSVhsv(263, 44%, 35%)
CMYKcmyk(27.3%, 44.3%, 0%, 65.5%)
CIE-LABlab(23.64, 16.15, -21.09)
CIE-LCHlch(23.64, 26.56, 307.43°)
OKLaboklab(34.82% 0.0348 -0.0588)
OKLCHoklch(34.82% 0.068 300.6)
XYZxyz(4.9737, 3.9912, 9.7390)
Luminance0.0399 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#403158 #495831
analogous
#313658 #403158 #543158
triadic
#403158 #584031 #315840
tetradic
#403158 #583136 #495831 #315854
square
#403158 #583136 #495831 #315854
split-complementary
#403158 #585431 #365831
monochromatic
#0E0B14 #231B31 #403158 #5D477F #795EA5

Accessibility & contrast

On white

11.68
#403158 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#403158 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #403158
11.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##403158#FFFFFF#000000##FFFFFF
##4031581.0011.681.8011.68
#FFFFFF11.681.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.681.0021.001.00

Color blindness preview

Protanopia (red-blind)
#273859
Deuteranopia (green-blind)
#2A3857
Tritanopia (blue-blind)
#3C3840
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #403158;
/* rgb */ color: rgb(64, 49, 88);
/* oklch */ color: oklch(34.8% 0.068 300.6);
Tailwind
colors: {
  custom: {
    50: '#766987',
    500: '#403158',
    950: '#000000',
  },
}
SCSS
$custom: #403158;
$custom-light: #766987;
$custom-dark: #000000;
JSON
{
  "hex": "#403158",
  "rgb": {
    "r": 64,
    "g": 49,
    "b": 88
  },
  "hsl": {
    "h": 263.077,
    "s": 28.467,
    "l": 26.863
  },
  "oklch": {
    "l": 0.34822,
    "c": 0.06837,
    "h": 300.6
  },
  "luminance": 0.03991
}

Semantic roles & 50–950 ramp

primary
#403158
secondary
#78895C
accent
#C5639F
background
#F7F6F8
surface
#EDEBEF
border
#C8C6CA
text
#08060B
muted
#7B7A7C

Preview Lab

Preview with #403158

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

Preview Lab → · Contrast checker → · Palette generator →

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