#312256#312256

#312256 is a dark, moderate violet. Relative luminance 0.025; OKLCH L 30.0% C 0.090 H 293.5°. Best body text is #FFFFFF at 14.06:1 contrast (WCAG AA passes).

Color values

HEX#312256
RGBrgb(49, 34, 86)
HSLhsl(257, 43%, 24%)
HSVhsv(257, 60%, 34%)
CMYKcmyk(43%, 60.5%, 0%, 66.3%)
CIE-LABlab(17.78, 21.04, -29.19)
CIE-LCHlch(17.78, 35.98, 305.79°)
OKLaboklab(30% 0.0361 -0.0829)
OKLCHoklch(30% 0.09 293.5)
XYZxyz(3.5179, 2.4688, 9.0935)
Luminance0.0247 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312256 #475622
analogous
#222D56 #312256 #4B2256
triadic
#312256 #563122 #225631
tetradic
#312256 #56222D #475622 #22564B
square
#312256 #56222D #475622 #22564B
split-complementary
#312256 #564B22 #2D5622
monochromatic
#0C0916 #18112A #312256 #4A3382 #6345AE

Accessibility & contrast

On white

14.06
#312256 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.49
#312256 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312256
14.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312256#FFFFFF#000000##FFFFFF
##3122561.0014.061.4914.06
#FFFFFF14.061.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#082C58
Deuteranopia (green-blind)
#0C2B55
Tritanopia (blue-blind)
#272D38
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #312256;
/* rgb */ color: rgb(49, 34, 86);
/* oklch */ color: oklch(30.0% 0.090 293.5);
Tailwind
colors: {
  custom: {
    50: '#6c5d86',
    500: '#312256',
    950: '#000000',
  },
}
SCSS
$custom: #312256;
$custom-light: #6c5d86;
$custom-dark: #000000;
JSON
{
  "hex": "#312256",
  "rgb": {
    "r": 49,
    "g": 34,
    "b": 86
  },
  "hsl": {
    "h": 257.308,
    "s": 43.333,
    "l": 23.529
  },
  "oklch": {
    "l": 0.29995,
    "c": 0.09041,
    "h": 293.5
  },
  "luminance": 0.02469
}

Semantic roles & 50–950 ramp

primary
#312256
secondary
#778A4A
accent
#D355AF
background
#F6F5F8
surface
#EBE9EF
border
#C6C5CA
text
#07040B
muted
#7A797C

Preview Lab

Preview with #312256

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

Preview Lab → · Contrast checker → · Palette generator →

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