#311B8F#311B8F

#311B8F is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.4% C 0.175 H 280.6°. Best body text is #FFFFFF at 12.47:1 contrast (WCAG AA passes).

Color values

HEX#311B8F
RGBrgb(49, 27, 143)
HSLhsl(251, 68%, 33%)
HSVhsv(251, 81%, 56%)
CMYKcmyk(65.7%, 81.1%, 0%, 43.9%)
CIE-LABlab(21.65, 43.38, -59.63)
CIE-LCHlch(21.65, 73.74, 306.03°)
OKLaboklab(34.4% 0.0323 -0.1721)
OKLCHoklch(34.4% 0.175 280.6)
XYZxyz(6.6149, 3.4195, 26.2927)
Luminance0.0342 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B8F #798F1B
analogous
#1B3F8F #311B8F #6B1B8F
triadic
#311B8F #8F311B #1B8F31
tetradic
#311B8F #8F1B3F #798F1B #1B8F6B
square
#311B8F #8F1B3F #798F1B #1B8F6B
split-complementary
#311B8F #8F6B1B #3F8F1B
monochromatic
#0E0828 #1F115C #311B8F #4325C2 #6448DC

Accessibility & contrast

On white

12.47
#311B8F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#311B8F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311B8F
12.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311B8F#FFFFFF#000000##FFFFFF
##311B8F1.0012.471.6812.47
#FFFFFF12.471.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003892
Deuteranopia (green-blind)
#00308D
Tritanopia (blue-blind)
#003E55
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #311b8f;
/* rgb */ color: rgb(49, 27, 143);
/* oklch */ color: oklch(34.4% 0.175 280.6);
Tailwind
colors: {
  custom: {
    50: '#775bb1',
    500: '#311b8f',
    950: '#000000',
  },
}
SCSS
$custom: #311b8f;
$custom-light: #775bb1;
$custom-dark: #000000;
JSON
{
  "hex": "#311b8f",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 143
  },
  "hsl": {
    "h": 251.379,
    "s": 68.235,
    "l": 33.333
  },
  "oklch": {
    "l": 0.34403,
    "c": 0.1751,
    "h": 280.6
  },
  "luminance": 0.0342
}

Semantic roles & 50–950 ramp

primary
#311B8F
secondary
#A8BE48
accent
#EB3DCA
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #311B8F

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

Preview Lab → · Contrast checker → · Palette generator →

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