#31175D#31175D

#31175D is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.7% C 0.117 H 294.9°. Best body text is #FFFFFF at 14.88:1 contrast (WCAG AA passes).

Color values

HEX#31175D
RGBrgb(49, 23, 93)
HSLhsl(262, 60%, 23%)
HSVhsv(262, 75%, 36%)
CMYKcmyk(47.3%, 75.3%, 0%, 63.5%)
CIE-LABlab(15.78, 30.13, -37.11)
CIE-LCHlch(15.78, 47.80, 309.08°)
OKLaboklab(28.73% 0.0494 -0.1062)
OKLCHoklch(28.73% 0.117 294.9)
XYZxyz(3.5483, 2.0560, 10.5637)
Luminance0.0206 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31175D #435D17
analogous
#17205D #31175D #54175D
triadic
#31175D #5D3117 #175D31
tetradic
#31175D #5D1720 #435D17 #175D54
square
#31175D #5D1720 #435D17 #175D54
split-complementary
#31175D #5D5417 #205D17
monochromatic
#0D0619 #170B2C #31175D #4B238E #652FBF

Accessibility & contrast

On white

14.88
#31175D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.41
#31175D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31175D
14.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31175D#FFFFFF#000000##FFFFFF
##31175D1.0014.881.4114.88
#FFFFFF14.881.0021.001.00
#0000001.4121.001.0021.00
##FFFFFF14.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00285F
Deuteranopia (green-blind)
#00265C
Tritanopia (blue-blind)
#252938
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #31175d;
/* rgb */ color: rgb(49, 23, 93);
/* oklch */ color: oklch(28.7% 0.117 294.9);
Tailwind
colors: {
  custom: {
    50: '#6e568c',
    500: '#31175d',
    950: '#000000',
  },
}
SCSS
$custom: #31175d;
$custom-light: #6e568c;
$custom-dark: #000000;
JSON
{
  "hex": "#31175d",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 93
  },
  "hsl": {
    "h": 262.286,
    "s": 60.345,
    "l": 22.745
  },
  "oklch": {
    "l": 0.28727,
    "c": 0.11711,
    "h": 294.9
  },
  "luminance": 0.02056
}

Semantic roles & 50–950 ramp

primary
#31175D
secondary
#73943C
accent
#E344A8
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07030C
muted
#7A787D

Preview Lab

Preview with #31175D

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

Preview Lab → · Contrast checker → · Palette generator →

#31175D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva