#311A8A#311A8A

#311A8A is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.7% C 0.170 H 281.7°. Best body text is #FFFFFF at 12.76:1 contrast (WCAG AA passes).

Color values

HEX#311A8A
RGBrgb(49, 26, 138)
HSLhsl(252, 68%, 32%)
HSVhsv(252, 81%, 54%)
CMYKcmyk(64.5%, 81.2%, 0%, 45.9%)
CIE-LABlab(20.93, 42.34, -57.70)
CIE-LCHlch(20.93, 71.57, 306.27°)
OKLaboklab(33.74% 0.0344 -0.1665)
OKLCHoklch(33.74% 0.17 281.7)
XYZxyz(6.2220, 3.2263, 24.3347)
Luminance0.0323 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311A8A #738A1A
analogous
#1A3B8A #311A8A #691A8A
triadic
#311A8A #8A311A #1A8A31
tetradic
#311A8A #8A1A3B #738A1A #1A8A69
square
#311A8A #8A1A3B #738A1A #1A8A69
split-complementary
#311A8A #8A691A #3B8A1A
monochromatic
#0C0723 #1F1057 #311A8A #4324BD #6243DC

Accessibility & contrast

On white

12.76
#311A8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #311A8A
12.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311A8A#FFFFFF#000000##FFFFFF
##311A8A1.0012.761.6512.76
#FFFFFF12.761.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00368D
Deuteranopia (green-blind)
#002E88
Tritanopia (blue-blind)
#003C52
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #311a8a;
/* rgb */ color: rgb(49, 26, 138);
/* oklch */ color: oklch(33.7% 0.170 281.7);
Tailwind
colors: {
  custom: {
    50: '#765bad',
    500: '#311a8a',
    950: '#000000',
  },
}
SCSS
$custom: #311a8a;
$custom-light: #765bad;
$custom-dark: #000000;
JSON
{
  "hex": "#311a8a",
  "rgb": {
    "r": 49,
    "g": 26,
    "b": 138
  },
  "hsl": {
    "h": 252.321,
    "s": 68.293,
    "l": 32.157
  },
  "oklch": {
    "l": 0.33736,
    "c": 0.17,
    "h": 281.7
  },
  "luminance": 0.03227
}

Semantic roles & 50–950 ramp

primary
#311A8A
secondary
#A4BD43
accent
#EB3DC7
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #311A8A

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

Preview Lab → · Contrast checker → · Palette generator →

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