#311A8B#311A8B

#311A8B is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.8% C 0.171 H 281.5°. Best body text is #FFFFFF at 12.72:1 contrast (WCAG AA passes).

Color values

HEX#311A8B
RGBrgb(49, 26, 139)
HSLhsl(252, 68%, 32%)
HSVhsv(252, 81%, 55%)
CMYKcmyk(64.7%, 81.3%, 0%, 45.5%)
CIE-LABlab(21.04, 42.64, -58.15)
CIE-LCHlch(21.04, 72.11, 306.26°)
OKLaboklab(33.85% 0.0341 -0.1678)
OKLCHoklch(33.85% 0.171 281.5)
XYZxyz(6.2948, 3.2554, 24.7177)
Luminance0.0326 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311A8B #748B1A
analogous
#1A3C8B #311A8B #691A8B
triadic
#311A8B #8B311A #1A8B31
tetradic
#311A8B #8B1A3C #748B1A #1A8B69
square
#311A8B #8B1A3C #748B1A #1A8B69
split-complementary
#311A8B #8B691A #3C8B1A
monochromatic
#0D0724 #1F1057 #311A8B #4324BF #6343DC

Accessibility & contrast

On white

12.72
#311A8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.65
#311A8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311A8B
12.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311A8B#FFFFFF#000000##FFFFFF
##311A8B1.0012.721.6512.72
#FFFFFF12.721.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00368E
Deuteranopia (green-blind)
#002E89
Tritanopia (blue-blind)
#003C53
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #311a8b;
/* rgb */ color: rgb(49, 26, 139);
/* oklch */ color: oklch(33.8% 0.171 281.5);
Tailwind
colors: {
  custom: {
    50: '#765bae',
    500: '#311a8b',
    950: '#000000',
  },
}
SCSS
$custom: #311a8b;
$custom-light: #765bae;
$custom-dark: #000000;
JSON
{
  "hex": "#311a8b",
  "rgb": {
    "r": 49,
    "g": 26,
    "b": 139
  },
  "hsl": {
    "h": 252.212,
    "s": 68.485,
    "l": 32.353
  },
  "oklch": {
    "l": 0.33846,
    "c": 0.1712,
    "h": 281.5
  },
  "luminance": 0.03256
}

Semantic roles & 50–950 ramp

primary
#311A8B
secondary
#A4BD44
accent
#EB3CC8
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #311A8B

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

Preview Lab → · Contrast checker → · Palette generator →

#311A8B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva