#31175F#31175F

#31175F is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.9% C 0.120 H 294.1°. Best body text is #FFFFFF at 14.81:1 contrast (WCAG AA passes).

Color values

HEX#31175F
RGBrgb(49, 23, 95)
HSLhsl(262, 61%, 23%)
HSVhsv(262, 76%, 37%)
CMYKcmyk(48.4%, 75.8%, 0%, 62.7%)
CIE-LABlab(15.96, 30.74, -38.14)
CIE-LCHlch(15.96, 48.99, 308.86°)
OKLaboklab(28.92% 0.049 -0.1092)
OKLCHoklch(28.92% 0.12 294.1)
XYZxyz(3.6380, 2.0919, 11.0363)
Luminance0.0209 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31175F #455F17
analogous
#17215F #31175F #55175F
triadic
#31175F #5F3117 #175F31
tetradic
#31175F #5F1721 #455F17 #175F55
square
#31175F #5F1721 #455F17 #175F55
split-complementary
#31175F #5F5517 #215F17
monochromatic
#0D0619 #180B2E #31175F #4A2390 #642FC2

Accessibility & contrast

On white

14.81
#31175F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.42
#31175F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31175F
14.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31175F#FFFFFF#000000##FFFFFF
##31175F1.0014.811.4214.81
#FFFFFF14.811.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002861
Deuteranopia (green-blind)
#00265E
Tritanopia (blue-blind)
#242939
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #31175f;
/* rgb */ color: rgb(49, 23, 95);
/* oklch */ color: oklch(28.9% 0.120 294.1);
Tailwind
colors: {
  custom: {
    50: '#6e568d',
    500: '#31175f',
    950: '#000000',
  },
}
SCSS
$custom: #31175f;
$custom-light: #6e568d;
$custom-dark: #000000;
JSON
{
  "hex": "#31175f",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 95
  },
  "hsl": {
    "h": 261.667,
    "s": 61.017,
    "l": 23.137
  },
  "oklch": {
    "l": 0.28915,
    "c": 0.1197,
    "h": 294.1
  },
  "luminance": 0.02092
}

Semantic roles & 50–950 ramp

primary
#31175F
secondary
#75963C
accent
#E444AA
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#08030C
muted
#7B787D

Preview Lab

Preview with #31175F

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

Preview Lab → · Contrast checker → · Palette generator →

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