#311B98#311B98

#311B98 is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.4% C 0.186 H 279.1°. Best body text is #FFFFFF at 12.06:1 contrast (WCAG AA passes).

Color values

HEX#311B98
RGBrgb(49, 27, 152)
HSLhsl(251, 70%, 35%)
HSVhsv(251, 82%, 60%)
CMYKcmyk(67.8%, 82.2%, 0%, 40.4%)
CIE-LABlab(22.66, 46.11, -63.52)
CIE-LCHlch(22.66, 78.49, 305.98°)
OKLaboklab(35.4% 0.0295 -0.1834)
OKLCHoklch(35.4% 0.186 279.1)
XYZxyz(7.3242, 3.7032, 30.0285)
Luminance0.0370 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B98 #82981B
analogous
#1B4498 #311B98 #6F1B98
triadic
#311B98 #98311B #1B9831
tetradic
#311B98 #981B44 #82981B #1B986F
square
#311B98 #981B44 #82981B #1B986F
split-complementary
#311B98 #986F1B #44981B
monochromatic
#0F0930 #201264 #311B98 #4224CC #684EE0

Accessibility & contrast

On white

12.06
#311B98 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#311B98 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311B98
12.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311B98#FFFFFF#000000##FFFFFF
##311B981.0012.061.7412.06
#FFFFFF12.061.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B9B
Deuteranopia (green-blind)
#003196
Tritanopia (blue-blind)
#00425A
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #311b98;
/* rgb */ color: rgb(49, 27, 152);
/* oklch */ color: oklch(35.4% 0.186 279.1);
Tailwind
colors: {
  custom: {
    50: '#795cb8',
    500: '#311b98',
    950: '#000000',
  },
}
SCSS
$custom: #311b98;
$custom-light: #795cb8;
$custom-dark: #000000;
JSON
{
  "hex": "#311b98",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 152
  },
  "hsl": {
    "h": 250.56,
    "s": 69.832,
    "l": 35.098
  },
  "oklch": {
    "l": 0.35404,
    "c": 0.18579,
    "h": 279.1
  },
  "luminance": 0.03704
}

Semantic roles & 50–950 ramp

primary
#311B98
secondary
#ADC24D
accent
#ED3BCD
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #311B98

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

Preview Lab → · Contrast checker → · Palette generator →

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