#312656#312656

#312656 is a dark, moderate violet. Relative luminance 0.027; OKLCH L 30.8% C 0.084 H 291.3°. Best body text is #FFFFFF at 13.62:1 contrast (WCAG AA passes).

Color values

HEX#312656
RGBrgb(49, 38, 86)
HSLhsl(254, 39%, 24%)
HSVhsv(254, 56%, 34%)
CMYKcmyk(43%, 55.8%, 0%, 66.3%)
CIE-LABlab(18.85, 18.32, -27.47)
CIE-LCHlch(18.85, 33.02, 303.70°)
OKLaboklab(30.79% 0.0303 -0.0779)
OKLCHoklch(30.79% 0.084 291.3)
XYZxyz(3.6390, 2.7110, 9.1338)
Luminance0.0271 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312656 #4B5626
analogous
#263356 #312656 #492656
triadic
#312656 #563126 #265631
tetradic
#312656 #562633 #4B5626 #265649
square
#312656 #562633 #4B5626 #265649
split-complementary
#312656 #564926 #335626
monochromatic
#0C0915 #19132C #312656 #493980 #614CAB

Accessibility & contrast

On white

13.62
#312656 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#312656 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312656
13.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312656#FFFFFF#000000##FFFFFF
##3126561.0013.621.5413.62
#FFFFFF13.621.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.621.0021.001.00

Color blindness preview

Protanopia (red-blind)
#122F58
Deuteranopia (green-blind)
#132D55
Tritanopia (blue-blind)
#27303A
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #312656;
/* rgb */ color: rgb(49, 38, 86);
/* oklch */ color: oklch(30.8% 0.084 291.3);
Tailwind
colors: {
  custom: {
    50: '#6c6086',
    500: '#312656',
    950: '#000000',
  },
}
SCSS
$custom: #312656;
$custom-light: #6c6086;
$custom-dark: #000000;
JSON
{
  "hex": "#312656",
  "rgb": {
    "r": 49,
    "g": 38,
    "b": 86
  },
  "hsl": {
    "h": 253.75,
    "s": 38.71,
    "l": 24.314
  },
  "oklch": {
    "l": 0.30789,
    "c": 0.08354,
    "h": 291.3
  },
  "luminance": 0.02711
}

Semantic roles & 50–950 ramp

primary
#312656
secondary
#7C894F
accent
#CF59B4
background
#F6F5F8
surface
#EBE9EF
border
#C6C5CA
text
#07050B
muted
#7A797C

Preview Lab

Preview with #312656

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

Preview Lab → · Contrast checker → · Palette generator →

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