#311272#311272

#311272 is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.2% C 0.149 H 288.7°. Best body text is #FFFFFF at 14.38:1 contrast (WCAG AA passes).

Color values

HEX#311272
RGBrgb(49, 18, 114)
HSLhsl(259, 73%, 26%)
HSVhsv(259, 84%, 45%)
CMYKcmyk(57%, 84.2%, 0%, 55.3%)
CIE-LABlab(16.99, 38.94, -48.93)
CIE-LCHlch(16.99, 62.53, 308.52°)
OKLaboklab(30.22% 0.0476 -0.1408)
OKLCHoklch(30.22% 0.149 288.7)
XYZxyz(4.5193, 2.3003, 16.1222)
Luminance0.0230 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311272 #537212
analogous
#122372 #311272 #611272
triadic
#311272 #723112 #127231
tetradic
#311272 #721223 #537212 #127261
square
#311272 #721223 #537212 #127261
split-complementary
#311272 #726112 #237212
monochromatic
#0B041A #1A0A3D #311272 #481AA7 #5E23DC

Accessibility & contrast

On white

14.38
#311272 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.46
#311272 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311272
14.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311272#FFFFFF#000000##FFFFFF
##3112721.0014.381.4614.38
#FFFFFF14.381.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C75
Deuteranopia (green-blind)
#002770
Tritanopia (blue-blind)
#162F43
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #311272;
/* rgb */ color: rgb(49, 18, 114);
/* oklch */ color: oklch(30.2% 0.149 288.7);
Tailwind
colors: {
  custom: {
    50: '#72559c',
    500: '#311272',
    950: '#000000',
  },
}
SCSS
$custom: #311272;
$custom-light: #72559c;
$custom-dark: #000000;
JSON
{
  "hex": "#311272",
  "rgb": {
    "r": 49,
    "g": 18,
    "b": 114
  },
  "hsl": {
    "h": 259.375,
    "s": 72.727,
    "l": 25.882
  },
  "oklch": {
    "l": 0.3022,
    "c": 0.14861,
    "h": 288.7
  },
  "luminance": 0.023
}

Semantic roles & 50–950 ramp

primary
#311272
secondary
#84A937
accent
#EF38B4
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09030E
muted
#7B787E

Preview Lab

Preview with #311272

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

Preview Lab → · Contrast checker → · Palette generator →

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