#312271#312271

#312271 is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.3% C 0.129 H 285.3°. Best body text is #FFFFFF at 13.14:1 contrast (WCAG AA passes).

Color values

HEX#312271
RGBrgb(49, 34, 113)
HSLhsl(251, 54%, 29%)
HSVhsv(251, 70%, 44%)
CMYKcmyk(56.6%, 69.9%, 0%, 55.7%)
CIE-LABlab(20.00, 29.88, -43.34)
CIE-LCHlch(20.00, 52.65, 304.58°)
OKLaboklab(32.32% 0.0341 -0.1245)
OKLCHoklch(32.32% 0.129 285.3)
XYZxyz(4.8184, 2.9890, 15.9426)
Luminance0.0299 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312271 #627122
analogous
#223B71 #312271 #592271
triadic
#312271 #713122 #227131
tetradic
#312271 #71223B #627122 #227159
square
#312271 #71223B #627122 #227159
split-complementary
#312271 #715922 #3B7122
monochromatic
#0A0718 #1D1442 #312271 #4530A0 #5F46C7

Accessibility & contrast

On white

13.14
#312271 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#312271 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312271
13.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312271#FFFFFF#000000##FFFFFF
##3122711.0013.141.6013.14
#FFFFFF13.141.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003273
Deuteranopia (green-blind)
#002E6F
Tritanopia (blue-blind)
#163646
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #312271;
/* rgb */ color: rgb(49, 34, 113);
/* oklch */ color: oklch(32.3% 0.129 285.3);
Tailwind
colors: {
  custom: {
    50: '#705e9b',
    500: '#312271',
    950: '#000000',
  },
}
SCSS
$custom: #312271;
$custom-light: #705e9b;
$custom-dark: #000000;
JSON
{
  "hex": "#312271",
  "rgb": {
    "r": 49,
    "g": 34,
    "b": 113
  },
  "hsl": {
    "h": 251.392,
    "s": 53.741,
    "l": 28.824
  },
  "oklch": {
    "l": 0.32316,
    "c": 0.12912,
    "h": 285.3
  },
  "luminance": 0.02989
}

Semantic roles & 50–950 ramp

primary
#312271
secondary
#93A44A
accent
#DD4BC1
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #312271

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

Preview Lab → · Contrast checker → · Palette generator →

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