#31185E#31185E

#31185E is a dark, moderate violet. Relative luminance 0.021; OKLCH L 29.0% C 0.117 H 294.2°. Best body text is #FFFFFF at 14.76:1 contrast (WCAG AA passes).

Color values

HEX#31185E
RGBrgb(49, 24, 94)
HSLhsl(261, 59%, 23%)
HSVhsv(261, 74%, 37%)
CMYKcmyk(47.9%, 74.5%, 0%, 63.1%)
CIE-LABlab(16.08, 29.86, -37.29)
CIE-LCHlch(16.08, 47.77, 308.69°)
OKLaboklab(28.97% 0.0481 -0.1067)
OKLCHoklch(28.97% 0.117 294.2)
XYZxyz(3.6131, 2.1143, 10.8052)
Luminance0.0211 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31185E #455E18
analogous
#18225E #31185E #54185E
triadic
#31185E #5E3118 #185E31
tetradic
#31185E #5E1822 #455E18 #185E54
square
#31185E #5E1822 #455E18 #185E54
split-complementary
#31185E #5E5418 #225E18
monochromatic
#0D0618 #180C2D #31185E #4A248F #6431C0

Accessibility & contrast

On white

14.76
#31185E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.42
#31185E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31185E
14.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31185E#FFFFFF#000000##FFFFFF
##31185E1.0014.761.4214.76
#FFFFFF14.761.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002960
Deuteranopia (green-blind)
#00275D
Tritanopia (blue-blind)
#242939
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #31185e;
/* rgb */ color: rgb(49, 24, 94);
/* oklch */ color: oklch(29.0% 0.117 294.2);
Tailwind
colors: {
  custom: {
    50: '#6e578c',
    500: '#31185e',
    950: '#000000',
  },
}
SCSS
$custom: #31185e;
$custom-light: #6e578c;
$custom-dark: #000000;
JSON
{
  "hex": "#31185e",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 94
  },
  "hsl": {
    "h": 261.429,
    "s": 59.322,
    "l": 23.137
  },
  "oklch": {
    "l": 0.28967,
    "c": 0.11706,
    "h": 294.2
  },
  "luminance": 0.02114
}

Semantic roles & 50–950 ramp

primary
#31185E
secondary
#75943D
accent
#E345AA
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07030C
muted
#7A787D

Preview Lab

Preview with #31185E

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

Preview Lab → · Contrast checker → · Palette generator →

#31185E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva