#31137F#31137F

#31137F is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.8% C 0.163 H 285.0°. Best body text is #FFFFFF at 13.72:1 contrast (WCAG AA passes).

Color values

HEX#31137F
RGBrgb(49, 19, 127)
HSLhsl(257, 74%, 29%)
HSVhsv(257, 85%, 50%)
CMYKcmyk(61.4%, 85%, 0%, 50.2%)
CIE-LABlab(18.59, 42.29, -54.63)
CIE-LCHlch(18.59, 69.09, 307.74°)
OKLaboklab(31.75% 0.0422 -0.1574)
OKLCHoklch(31.75% 0.163 285)
XYZxyz(5.3291, 2.6507, 20.3054)
Luminance0.0265 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31137F #617F13
analogous
#132B7F #31137F #67137F
triadic
#31137F #7F3113 #137F31
tetradic
#31137F #7F132B #617F13 #137F67
square
#31137F #7F132B #617F13 #137F67
split-complementary
#31137F #7F6713 #2B7F13
monochromatic
#0A041B #1C0B4A #31137F #461BB4 #5E2DE0

Accessibility & contrast

On white

13.72
#31137F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#31137F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31137F
13.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31137F#FFFFFF#000000##FFFFFF
##31137F1.0013.721.5313.72
#FFFFFF13.721.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003082
Deuteranopia (green-blind)
#002A7D
Tritanopia (blue-blind)
#00354A
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #31137f;
/* rgb */ color: rgb(49, 19, 127);
/* oklch */ color: oklch(31.8% 0.163 285.0);
Tailwind
colors: {
  custom: {
    50: '#7456a5',
    500: '#31137f',
    950: '#000000',
  },
}
SCSS
$custom: #31137f;
$custom-light: #7456a5;
$custom-dark: #000000;
JSON
{
  "hex": "#31137f",
  "rgb": {
    "r": 49,
    "g": 19,
    "b": 127
  },
  "hsl": {
    "h": 256.667,
    "s": 73.973,
    "l": 28.627
  },
  "oklch": {
    "l": 0.31752,
    "c": 0.163,
    "h": 285
  },
  "luminance": 0.02651
}

Semantic roles & 50–950 ramp

primary
#31137F
secondary
#92B439
accent
#F137BD
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #31137F

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

Preview Lab → · Contrast checker → · Palette generator →

#31137F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva