#312557#312557

#312557 is a dark, moderate violet. Relative luminance 0.027; OKLCH L 30.7% C 0.087 H 291.5°. Best body text is #FFFFFF at 13.70:1 contrast (WCAG AA passes).

Color values

HEX#312557
RGBrgb(49, 37, 87)
HSLhsl(254, 40%, 24%)
HSVhsv(254, 57%, 34%)
CMYKcmyk(43.7%, 57.5%, 0%, 65.9%)
CIE-LABlab(18.65, 19.33, -28.46)
CIE-LCHlch(18.65, 34.40, 304.18°)
OKLaboklab(30.66% 0.0318 -0.0808)
OKLCHoklch(30.66% 0.087 291.5)
XYZxyz(3.6480, 2.6641, 9.3370)
Luminance0.0266 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312557 #4B5725
analogous
#253257 #312557 #4A2557
triadic
#312557 #573125 #255731
tetradic
#312557 #572532 #4B5725 #25574A
square
#312557 #572532 #4B5725 #25574A
split-complementary
#312557 #574A25 #325725
monochromatic
#0C0915 #19132C #312557 #493782 #614AAD

Accessibility & contrast

On white

13.70
#312557 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#312557 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312557
13.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312557#FFFFFF#000000##FFFFFF
##3125571.0013.701.5313.70
#FFFFFF13.701.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0F2E59
Deuteranopia (green-blind)
#112C56
Tritanopia (blue-blind)
#272F3A
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #312557;
/* rgb */ color: rgb(49, 37, 87);
/* oklch */ color: oklch(30.7% 0.087 291.5);
Tailwind
colors: {
  custom: {
    50: '#6c6087',
    500: '#312557',
    950: '#000000',
  },
}
SCSS
$custom: #312557;
$custom-light: #6c6087;
$custom-dark: #000000;
JSON
{
  "hex": "#312557",
  "rgb": {
    "r": 49,
    "g": 37,
    "b": 87
  },
  "hsl": {
    "h": 254.4,
    "s": 40.323,
    "l": 24.314
  },
  "oklch": {
    "l": 0.30662,
    "c": 0.08682,
    "h": 291.5
  },
  "luminance": 0.02664
}

Semantic roles & 50–950 ramp

primary
#312557
secondary
#7C8A4D
accent
#D058B3
background
#F6F5F8
surface
#EBE9EF
border
#C6C5CA
text
#07040B
muted
#7A797C

Preview Lab

Preview with #312557

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

Preview Lab → · Contrast checker → · Palette generator →

#312557 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva