#311772#311772

#311772 is a dark, vivid violet. Relative luminance 0.025; OKLCH L 30.8% C 0.144 H 287.8°. Best body text is #FFFFFF at 14.04:1 contrast (WCAG AA passes).

Color values

HEX#311772
RGBrgb(49, 23, 114)
HSLhsl(257, 66%, 27%)
HSVhsv(257, 80%, 45%)
CMYKcmyk(57%, 79.8%, 0%, 55.3%)
CIE-LABlab(17.83, 36.52, -47.55)
CIE-LCHlch(17.83, 59.95, 307.53°)
OKLaboklab(30.8% 0.0439 -0.1368)
OKLCHoklch(30.8% 0.144 287.8)
XYZxyz(4.6094, 2.4804, 16.1522)
Luminance0.0248 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311772 #587217
analogous
#172B72 #311772 #5F1772
triadic
#311772 #723117 #177231
tetradic
#311772 #72172B #587217 #17725F
square
#311772 #72172B #587217 #17725F
split-complementary
#311772 #725F17 #2B7217
monochromatic
#0B0519 #1B0D3F #311772 #4721A5 #5E2ED5

Accessibility & contrast

On white

14.04
#311772 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.50
#311772 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311772
14.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311772#FFFFFF#000000##FFFFFF
##3117721.0014.041.5014.04
#FFFFFF14.041.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF14.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E75
Deuteranopia (green-blind)
#002970
Tritanopia (blue-blind)
#163144
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #311772;
/* rgb */ color: rgb(49, 23, 114);
/* oklch */ color: oklch(30.8% 0.144 287.8);
Tailwind
colors: {
  custom: {
    50: '#71579b',
    500: '#311772',
    950: '#000000',
  },
}
SCSS
$custom: #311772;
$custom-light: #71579b;
$custom-dark: #000000;
JSON
{
  "hex": "#311772",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 114
  },
  "hsl": {
    "h": 257.143,
    "s": 66.423,
    "l": 26.863
  },
  "oklch": {
    "l": 0.30804,
    "c": 0.14367,
    "h": 287.8
  },
  "luminance": 0.02481
}

Semantic roles & 50–950 ramp

primary
#311772
secondary
#89A83D
accent
#E93EB9
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #311772

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

Preview Lab → · Contrast checker → · Palette generator →

#311772 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva