#312166#312166

#312166 is a dark, moderate violet. Relative luminance 0.027; OKLCH L 31.1% C 0.115 H 288.5°. Best body text is #FFFFFF at 13.64:1 contrast (WCAG AA passes).

Color values

HEX#312166
RGBrgb(49, 33, 102)
HSLhsl(254, 51%, 26%)
HSVhsv(254, 68%, 40%)
CMYKcmyk(52%, 67.6%, 0%, 60%)
CIE-LABlab(18.80, 26.89, -38.15)
CIE-LCHlch(18.80, 46.67, 305.18°)
OKLaboklab(31.15% 0.0366 -0.1093)
OKLCHoklch(31.15% 0.115 288.5)
XYZxyz(4.2081, 2.6998, 12.8672)
Luminance0.0270 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312166 #566621
analogous
#213466 #312166 #542166
triadic
#312166 #663121 #216631
tetradic
#312166 #662134 #566621 #216654
square
#312166 #662134 #566621 #216654
split-complementary
#312166 #665421 #346621
monochromatic
#0B0717 #1B1238 #312166 #473094 #5E40C1

Accessibility & contrast

On white

13.64
#312166 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#312166 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312166
13.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312166#FFFFFF#000000##FFFFFF
##3121661.0013.641.5413.64
#FFFFFF13.641.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F68
Deuteranopia (green-blind)
#002C65
Tritanopia (blue-blind)
#1F3240
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #312166;
/* rgb */ color: rgb(49, 33, 102);
/* oklch */ color: oklch(31.1% 0.115 288.5);
Tailwind
colors: {
  custom: {
    50: '#6e5d92',
    500: '#312166',
    950: '#000000',
  },
}
SCSS
$custom: #312166;
$custom-light: #6e5d92;
$custom-dark: #000000;
JSON
{
  "hex": "#312166",
  "rgb": {
    "r": 49,
    "g": 33,
    "b": 102
  },
  "hsl": {
    "h": 253.913,
    "s": 51.111,
    "l": 26.471
  },
  "oklch": {
    "l": 0.31147,
    "c": 0.11523,
    "h": 288.5
  },
  "luminance": 0.027
}

Semantic roles & 50–950 ramp

primary
#312166
secondary
#879A49
accent
#DB4DBA
background
#F6F5F9
surface
#ECE9F1
border
#C7C5CB
text
#08040D
muted
#7B797E

Preview Lab

Preview with #312166

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

Preview Lab → · Contrast checker → · Palette generator →

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