#403271#403271

#403271 is a dark, moderate violet. Relative luminance 0.046; OKLCH L 36.7% C 0.104 H 290.5°. Best body text is #FFFFFF at 10.98:1 contrast (WCAG AA passes).

Color values

HEX#403271
RGBrgb(64, 50, 113)
HSLhsl(253, 39%, 32%)
HSVhsv(253, 56%, 44%)
CMYKcmyk(43.4%, 55.8%, 0%, 55.7%)
CIE-LABlab(25.45, 22.98, -34.45)
CIE-LCHlch(25.45, 41.41, 303.70°)
OKLaboklab(36.68% 0.0367 -0.0978)
OKLCHoklch(36.68% 0.104 290.5)
XYZxyz(6.2348, 4.5633, 16.1719)
Luminance0.0456 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#403271 #637132
analogous
#324471 #403271 #603271
triadic
#403271 #714032 #327140
tetradic
#403271 #713244 #637132 #327160
square
#403271 #713244 #637132 #327160
split-complementary
#403271 #716032 #447132
monochromatic
#100C1C #281F47 #403271 #58459B #7763BA

Accessibility & contrast

On white

10.98
#403271 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.91
#403271 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #403271
10.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##403271#FFFFFF#000000##FFFFFF
##4032711.0010.981.9110.98
#FFFFFF10.981.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF10.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#153D73
Deuteranopia (green-blind)
#173B70
Tritanopia (blue-blind)
#323F4C
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #403271;
/* rgb */ color: rgb(64, 50, 113);
/* oklch */ color: oklch(36.7% 0.104 290.5);
Tailwind
colors: {
  custom: {
    50: '#786a9a',
    500: '#403271',
    950: '#000000',
  },
}
SCSS
$custom: #403271;
$custom-light: #786a9a;
$custom-dark: #000000;
JSON
{
  "hex": "#403271",
  "rgb": {
    "r": 64,
    "g": 50,
    "b": 113
  },
  "hsl": {
    "h": 253.333,
    "s": 38.65,
    "l": 31.961
  },
  "oklch": {
    "l": 0.36679,
    "c": 0.10447,
    "h": 290.5
  },
  "luminance": 0.04563
}

Semantic roles & 50–950 ramp

primary
#403271
secondary
#93A25D
accent
#CF59B4
background
#F7F6F9
surface
#EDEBF2
border
#C8C6CC
text
#09060E
muted
#7B7A7E

Preview Lab

Preview with #403271

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

Preview Lab → · Contrast checker → · Palette generator →

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