#31245C#31245C

#31245C is a dark, moderate violet. Relative luminance 0.027; OKLCH L 30.9% C 0.096 H 290.3°. Best body text is #FFFFFF at 13.66:1 contrast (WCAG AA passes).

Color values

HEX#31245C
RGBrgb(49, 36, 92)
HSLhsl(254, 44%, 25%)
HSVhsv(254, 61%, 36%)
CMYKcmyk(46.7%, 60.9%, 0%, 63.9%)
CIE-LABlab(18.75, 21.63, -31.63)
CIE-LCHlch(18.75, 38.32, 304.37°)
OKLaboklab(30.85% 0.0334 -0.0901)
OKLCHoklch(30.85% 0.096 290.3)
XYZxyz(3.8287, 2.6873, 10.4401)
Luminance0.0269 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31245C #4F5C24
analogous
#24335C #31245C #4D245C
triadic
#31245C #5C3124 #245C31
tetradic
#31245C #5C2433 #4F5C24 #245C4D
square
#31245C #5C2433 #4F5C24 #245C4D
split-complementary
#31245C #5C4D24 #335C24
monochromatic
#0C0916 #1A1330 #31245C #483588 #6046B4

Accessibility & contrast

On white

13.66
#31245C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#31245C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31245C
13.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31245C#FFFFFF#000000##FFFFFF
##31245C1.0013.661.5413.66
#FFFFFF13.661.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#042F5E
Deuteranopia (green-blind)
#072C5B
Tritanopia (blue-blind)
#25303C
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #31245c;
/* rgb */ color: rgb(49, 36, 92);
/* oklch */ color: oklch(30.9% 0.096 290.3);
Tailwind
colors: {
  custom: {
    50: '#6d5f8b',
    500: '#31245c',
    950: '#000000',
  },
}
SCSS
$custom: #31245c;
$custom-light: #6d5f8b;
$custom-dark: #000000;
JSON
{
  "hex": "#31245c",
  "rgb": {
    "r": 49,
    "g": 36,
    "b": 92
  },
  "hsl": {
    "h": 253.929,
    "s": 43.75,
    "l": 25.098
  },
  "oklch": {
    "l": 0.30853,
    "c": 0.09608,
    "h": 290.3
  },
  "luminance": 0.02687
}

Semantic roles & 50–950 ramp

primary
#31245C
secondary
#80904C
accent
#D354B6
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07040C
muted
#7A797D

Preview Lab

Preview with #31245C

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

Preview Lab → · Contrast checker → · Palette generator →

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