#311C98#311C98

#311C98 is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.5% C 0.185 H 279.0°. Best body text is #FFFFFF at 12.00:1 contrast (WCAG AA passes).

Color values

HEX#311C98
RGBrgb(49, 28, 152)
HSLhsl(250, 69%, 35%)
HSVhsv(250, 82%, 60%)
CMYKcmyk(67.8%, 81.6%, 0%, 40.4%)
CIE-LABlab(22.83, 45.64, -63.25)
CIE-LCHlch(22.83, 78.00, 305.81°)
OKLaboklab(35.52% 0.029 -0.1827)
OKLCHoklch(35.52% 0.185 279)
XYZxyz(7.3476, 3.7499, 30.0363)
Luminance0.0375 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311C98 #83981C
analogous
#1C4598 #311C98 #6F1C98
triadic
#311C98 #98311C #1C9831
tetradic
#311C98 #981C45 #83981C #1C986F
square
#311C98 #981C45 #83981C #1C986F
split-complementary
#311C98 #986F1C #45981C
monochromatic
#100931 #201264 #311C98 #4226CC #6850DF

Accessibility & contrast

On white

12.00
#311C98 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#311C98 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311C98
12.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311C98#FFFFFF#000000##FFFFFF
##311C981.0012.001.7512.00
#FFFFFF12.001.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF12.001.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #311c98;
/* rgb */ color: rgb(49, 28, 152);
/* oklch */ color: oklch(35.5% 0.185 279.0);
Tailwind
colors: {
  custom: {
    50: '#795db8',
    500: '#311c98',
    950: '#000000',
  },
}
SCSS
$custom: #311c98;
$custom-light: #795db8;
$custom-dark: #000000;
JSON
{
  "hex": "#311c98",
  "rgb": {
    "r": 49,
    "g": 28,
    "b": 152
  },
  "hsl": {
    "h": 250.161,
    "s": 68.889,
    "l": 35.294
  },
  "oklch": {
    "l": 0.35516,
    "c": 0.18496,
    "h": 279
  },
  "luminance": 0.0375
}

Semantic roles & 50–950 ramp

primary
#311C98
secondary
#AEC14E
accent
#EC3CCE
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #311C98

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

Preview Lab → · Contrast checker → · Palette generator →

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