#311271#311271

#311271 is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.1% C 0.147 H 289.0°. Best body text is #FFFFFF at 14.43:1 contrast (WCAG AA passes).

Color values

HEX#311271
RGBrgb(49, 18, 113)
HSLhsl(260, 73%, 26%)
HSVhsv(260, 84%, 44%)
CMYKcmyk(56.6%, 84.1%, 0%, 55.7%)
CIE-LABlab(16.88, 38.65, -48.46)
CIE-LCHlch(16.88, 61.99, 308.58°)
OKLaboklab(30.11% 0.048 -0.1394)
OKLCHoklch(30.11% 0.147 289)
XYZxyz(4.4627, 2.2776, 15.8241)
Luminance0.0228 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311271 #527112
analogous
#122271 #311271 #601271
triadic
#311271 #713112 #127131
tetradic
#311271 #711222 #527112 #127160
square
#311271 #711222 #527112 #127160
split-complementary
#311271 #716012 #227112
monochromatic
#0B041A #1A0A3C #311271 #481AA6 #5F23DB

Accessibility & contrast

On white

14.43
#311271 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #311271
14.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311271#FFFFFF#000000##FFFFFF
##3112711.0014.431.4614.43
#FFFFFF14.431.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B74
Deuteranopia (green-blind)
#00276F
Tritanopia (blue-blind)
#172E42
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #311271;
/* rgb */ color: rgb(49, 18, 113);
/* oklch */ color: oklch(30.1% 0.147 289.0);
Tailwind
colors: {
  custom: {
    50: '#72559b',
    500: '#311271',
    950: '#000000',
  },
}
SCSS
$custom: #311271;
$custom-light: #72559b;
$custom-dark: #000000;
JSON
{
  "hex": "#311271",
  "rgb": {
    "r": 49,
    "g": 18,
    "b": 113
  },
  "hsl": {
    "h": 259.579,
    "s": 72.519,
    "l": 25.686
  },
  "oklch": {
    "l": 0.30112,
    "c": 0.14743,
    "h": 289
  },
  "luminance": 0.02278
}

Semantic roles & 50–950 ramp

primary
#311271
secondary
#83A837
accent
#EF39B4
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09030E
muted
#7B787E

Preview Lab

Preview with #311271

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

Preview Lab → · Contrast checker → · Palette generator →

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