#311B74#311B74

#311B74 is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.5% C 0.142 H 286.4°. Best body text is #FFFFFF at 13.64:1 contrast (WCAG AA passes).

Color values

HEX#311B74
RGBrgb(49, 27, 116)
HSLhsl(255, 62%, 28%)
HSVhsv(255, 77%, 45%)
CMYKcmyk(57.8%, 76.7%, 0%, 54.5%)
CIE-LABlab(18.79, 34.99, -47.26)
CIE-LCHlch(18.79, 58.80, 306.51°)
OKLaboklab(31.54% 0.04 -0.136)
OKLCHoklch(31.54% 0.142 286.4)
XYZxyz(4.8100, 2.6975, 16.7868)
Luminance0.0270 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B74 #5E741B
analogous
#1B3274 #311B74 #5D1B74
triadic
#311B74 #74311B #1B7431
tetradic
#311B74 #741B32 #5E741B #1B745D
square
#311B74 #741B32 #5E741B #1B745D
split-complementary
#311B74 #745D1B #32741B
monochromatic
#0A0619 #1C0F42 #311B74 #4627A6 #5E39D1

Accessibility & contrast

On white

13.64
#311B74 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#311B74 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311B74
13.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311B74#FFFFFF#000000##FFFFFF
##311B741.0013.641.5413.64
#FFFFFF13.641.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003077
Deuteranopia (green-blind)
#002B72
Tritanopia (blue-blind)
#133346
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #311b74;
/* rgb */ color: rgb(49, 27, 116);
/* oklch */ color: oklch(31.5% 0.142 286.4);
Tailwind
colors: {
  custom: {
    50: '#725a9d',
    500: '#311b74',
    950: '#000000',
  },
}
SCSS
$custom: #311b74;
$custom-light: #725a9d;
$custom-dark: #000000;
JSON
{
  "hex": "#311b74",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 116
  },
  "hsl": {
    "h": 254.831,
    "s": 62.238,
    "l": 28.039
  },
  "oklch": {
    "l": 0.3154,
    "c": 0.14176,
    "h": 286.4
  },
  "luminance": 0.02698
}

Semantic roles & 50–950 ramp

primary
#311B74
secondary
#8FA942
accent
#E542BD
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #311B74

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

Preview Lab → · Contrast checker → · Palette generator →

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