#312161#312161

#312161 is a dark, moderate violet. Relative luminance 0.026; OKLCH L 30.7% C 0.108 H 290.0°. Best body text is #FFFFFF at 13.81:1 contrast (WCAG AA passes).

Color values

HEX#312161
RGBrgb(49, 33, 97)
HSLhsl(255, 49%, 25%)
HSVhsv(255, 66%, 38%)
CMYKcmyk(49.5%, 66%, 0%, 62%)
CIE-LABlab(18.38, 25.25, -35.54)
CIE-LCHlch(18.38, 43.59, 305.40°)
OKLaboklab(30.71% 0.0371 -0.1016)
OKLCHoklch(30.71% 0.108 290)
XYZxyz(3.9675, 2.6036, 11.6004)
Luminance0.0260 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312161 #516121
analogous
#213161 #312161 #512161
triadic
#312161 #613121 #216131
tetradic
#312161 #612131 #516121 #216151
square
#312161 #612131 #516121 #216151
split-complementary
#312161 #615121 #316121
monochromatic
#0C0817 #1A1133 #312161 #48318F #5F40BC

Accessibility & contrast

On white

13.81
#312161 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#312161 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312161
13.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312161#FFFFFF#000000##FFFFFF
##3121611.0013.811.5213.81
#FFFFFF13.811.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E63
Deuteranopia (green-blind)
#002B60
Tritanopia (blue-blind)
#22303D
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #312161;
/* rgb */ color: rgb(49, 33, 97);
/* oklch */ color: oklch(30.7% 0.108 290.0);
Tailwind
colors: {
  custom: {
    50: '#6e5d8e',
    500: '#312161',
    950: '#000000',
  },
}
SCSS
$custom: #312161;
$custom-light: #6e5d8e;
$custom-dark: #000000;
JSON
{
  "hex": "#312161",
  "rgb": {
    "r": 49,
    "g": 33,
    "b": 97
  },
  "hsl": {
    "h": 255,
    "s": 49.231,
    "l": 25.49
  },
  "oklch": {
    "l": 0.30711,
    "c": 0.10813,
    "h": 290
  },
  "luminance": 0.02604
}

Semantic roles & 50–950 ramp

primary
#312161
secondary
#829549
accent
#D94FB6
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07040C
muted
#7A797D

Preview Lab

Preview with #312161

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

Preview Lab → · Contrast checker → · Palette generator →

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