#312657#312657

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

Color values

HEX#312657
RGBrgb(49, 38, 87)
HSLhsl(253, 39%, 25%)
HSVhsv(253, 56%, 34%)
CMYKcmyk(43.7%, 56.3%, 0%, 65.9%)
CIE-LABlab(18.92, 18.64, -28.03)
CIE-LCHlch(18.92, 33.66, 303.63°)
OKLaboklab(30.86% 0.0304 -0.0795)
OKLCHoklch(30.86% 0.085 290.9)
XYZxyz(3.6796, 2.7272, 9.3475)
Luminance0.0273 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312657 #4C5726
analogous
#263457 #312657 #4A2657
triadic
#312657 #573126 #265731
tetradic
#312657 #572634 #4C5726 #26574A
square
#312657 #572634 #4C5726 #26574A
split-complementary
#312657 #574A26 #345726
monochromatic
#0C0915 #19132C #312657 #493982 #614BAC

Accessibility & contrast

On white

13.59
#312657 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#312657 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312657
13.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312657#FFFFFF#000000##FFFFFF
##3126571.0013.591.5513.59
#FFFFFF13.591.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#112F59
Deuteranopia (green-blind)
#122D56
Tritanopia (blue-blind)
#27303A
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #312657;
/* rgb */ color: rgb(49, 38, 87);
/* oklch */ color: oklch(30.9% 0.085 290.9);
Tailwind
colors: {
  custom: {
    50: '#6c6087',
    500: '#312657',
    950: '#000000',
  },
}
SCSS
$custom: #312657;
$custom-light: #6c6087;
$custom-dark: #000000;
JSON
{
  "hex": "#312657",
  "rgb": {
    "r": 49,
    "g": 38,
    "b": 87
  },
  "hsl": {
    "h": 253.469,
    "s": 39.2,
    "l": 24.51
  },
  "oklch": {
    "l": 0.30864,
    "c": 0.0851,
    "h": 290.9
  },
  "luminance": 0.02727
}

Semantic roles & 50–950 ramp

primary
#312657
secondary
#7D8A4F
accent
#CF59B5
background
#F6F5F8
surface
#EBE9EF
border
#C6C5CA
text
#07050B
muted
#7A797C

Preview Lab

Preview with #312657

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

Preview Lab → · Contrast checker → · Palette generator →

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