#312751#312751

#312751 is a dark, moderate violet. Relative luminance 0.027; OKLCH L 30.6% C 0.074 H 292.4°. Best body text is #FFFFFF at 13.64:1 contrast (WCAG AA passes).

Color values

HEX#312751
RGBrgb(49, 39, 81)
HSLhsl(254, 35%, 24%)
HSVhsv(254, 52%, 32%)
CMYKcmyk(39.5%, 51.9%, 0%, 68.2%)
CIE-LABlab(18.79, 16.02, -24.20)
CIE-LCHlch(18.79, 29.02, 303.50°)
OKLaboklab(30.64% 0.0282 -0.0683)
OKLCHoklch(30.64% 0.074 292.4)
XYZxyz(3.4770, 2.6980, 8.1206)
Luminance0.0270 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312751 #475127
analogous
#273251 #312751 #462751
triadic
#312751 #513127 #275131
tetradic
#312751 #512732 #475127 #275146
square
#312751 #512732 #475127 #275146
split-complementary
#312751 #514627 #325127
monochromatic
#0C0A15 #181328 #312751 #4A3B7A #634FA4

Accessibility & contrast

On white

13.64
#312751 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #312751
13.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312751#FFFFFF#000000##FFFFFF
##3127511.0013.641.5413.64
#FFFFFF13.641.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#182E53
Deuteranopia (green-blind)
#192D50
Tritanopia (blue-blind)
#292F38
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #312751;
/* rgb */ color: rgb(49, 39, 81);
/* oklch */ color: oklch(30.6% 0.074 292.4);
Tailwind
colors: {
  custom: {
    50: '#6b6182',
    500: '#312751',
    950: '#000000',
  },
}
SCSS
$custom: #312751;
$custom-light: #6b6182;
$custom-dark: #000000;
JSON
{
  "hex": "#312751",
  "rgb": {
    "r": 49,
    "g": 39,
    "b": 81
  },
  "hsl": {
    "h": 254.286,
    "s": 35,
    "l": 23.529
  },
  "oklch": {
    "l": 0.3064,
    "c": 0.07388,
    "h": 292.4
  },
  "luminance": 0.02698
}

Semantic roles & 50–950 ramp

primary
#312751
secondary
#778450
accent
#CB5DB1
background
#F6F5F7
surface
#EBE9EE
border
#C6C5C9
text
#07050A
muted
#7A797C

Preview Lab

Preview with #312751

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

Preview Lab → · Contrast checker → · Palette generator →

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