#311B7B#311B7B

#311B7B is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.3% C 0.151 H 284.7°. Best body text is #FFFFFF at 13.35:1 contrast (WCAG AA passes).

Color values

HEX#311B7B
RGBrgb(49, 27, 123)
HSLhsl(254, 64%, 29%)
HSVhsv(254, 78%, 48%)
CMYKcmyk(60.2%, 78%, 0%, 51.8%)
CIE-LABlab(19.50, 37.18, -50.58)
CIE-LCHlch(19.50, 62.78, 306.32°)
OKLaboklab(32.26% 0.0382 -0.1457)
OKLCHoklch(32.26% 0.151 284.7)
XYZxyz(5.2326, 2.8666, 19.0126)
Luminance0.0287 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B7B #657B1B
analogous
#1B357B #311B7B #611B7B
triadic
#311B7B #7B311B #1B7B31
tetradic
#311B7B #7B1B35 #657B1B #1B7B61
square
#311B7B #7B1B35 #657B1B #1B7B61
split-complementary
#311B7B #7B611B #357B1B
monochromatic
#0A0619 #1D1049 #311B7B #4526AD #5F3CD4

Accessibility & contrast

On white

13.35
#311B7B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#311B7B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311B7B
13.35:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311B7B#FFFFFF#000000##FFFFFF
##311B7B1.0013.351.5713.35
#FFFFFF13.351.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.351.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00327E
Deuteranopia (green-blind)
#002C79
Tritanopia (blue-blind)
#08364A
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #311b7b;
/* rgb */ color: rgb(49, 27, 123);
/* oklch */ color: oklch(32.3% 0.151 284.7);
Tailwind
colors: {
  custom: {
    50: '#735aa2',
    500: '#311b7b',
    950: '#000000',
  },
}
SCSS
$custom: #311b7b;
$custom-light: #735aa2;
$custom-dark: #000000;
JSON
{
  "hex": "#311b7b",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 123
  },
  "hsl": {
    "h": 253.75,
    "s": 64,
    "l": 29.412
  },
  "oklch": {
    "l": 0.32258,
    "c": 0.15062,
    "h": 284.7
  },
  "luminance": 0.02867
}

Semantic roles & 50–950 ramp

primary
#311B7B
secondary
#96AF43
accent
#E741C1
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #311B7B

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

Preview Lab → · Contrast checker → · Palette generator →

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