#31245F#31245F

#31245F is a dark, moderate violet. Relative luminance 0.027; OKLCH L 31.1% C 0.101 H 289.4°. Best body text is #FFFFFF at 13.56:1 contrast (WCAG AA passes).

Color values

HEX#31245F
RGBrgb(49, 36, 95)
HSLhsl(253, 45%, 26%)
HSVhsv(253, 62%, 37%)
CMYKcmyk(48.4%, 62.1%, 0%, 62.7%)
CIE-LABlab(18.97, 22.62, -33.25)
CIE-LCHlch(18.97, 40.22, 304.23°)
OKLaboklab(31.1% 0.0334 -0.0949)
OKLCHoklch(31.1% 0.101 289.4)
XYZxyz(3.9625, 2.7408, 11.1445)
Luminance0.0274 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31245F #525F24
analogous
#24345F #31245F #4E245F
triadic
#31245F #5F3124 #245F31
tetradic
#31245F #5F2434 #525F24 #245F4E
square
#31245F #5F2434 #525F24 #245F4E
split-complementary
#31245F #5F4E24 #345F24
monochromatic
#0B0816 #1A1333 #31245F #48358B #5F46B8

Accessibility & contrast

On white

13.56
#31245F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#31245F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31245F
13.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31245F#FFFFFF#000000##FFFFFF
##31245F1.0013.561.5513.56
#FFFFFF13.561.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F61
Deuteranopia (green-blind)
#012D5E
Tritanopia (blue-blind)
#23313D
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #31245f;
/* rgb */ color: rgb(49, 36, 95);
/* oklch */ color: oklch(31.1% 0.101 289.4);
Tailwind
colors: {
  custom: {
    50: '#6d5f8d',
    500: '#31245f',
    950: '#000000',
  },
}
SCSS
$custom: #31245f;
$custom-light: #6d5f8d;
$custom-dark: #000000;
JSON
{
  "hex": "#31245f",
  "rgb": {
    "r": 49,
    "g": 36,
    "b": 95
  },
  "hsl": {
    "h": 253.22,
    "s": 45.038,
    "l": 25.686
  },
  "oklch": {
    "l": 0.31095,
    "c": 0.10055,
    "h": 289.4
  },
  "luminance": 0.02741
}

Semantic roles & 50–950 ramp

primary
#31245F
secondary
#83934C
accent
#D553B8
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07040C
muted
#7A797D

Preview Lab

Preview with #31245F

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

Preview Lab → · Contrast checker → · Palette generator →

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