#311158#311158

#311158 is a dark, moderate violet. Relative luminance 0.018; OKLCH L 27.4% C 0.119 H 298.7°. Best body text is #FFFFFF at 15.54:1 contrast (WCAG AA passes).

Color values

HEX#311158
RGBrgb(49, 17, 88)
HSLhsl(267, 68%, 21%)
HSVhsv(267, 81%, 35%)
CMYKcmyk(44.3%, 80.7%, 0%, 65.5%)
CIE-LABlab(14.16, 31.90, -36.39)
CIE-LCHlch(14.16, 48.39, 311.24°)
OKLaboklab(27.44% 0.0569 -0.104)
OKLCHoklch(27.44% 0.119 298.7)
XYZxyz(3.2281, 1.7584, 9.4000)
Luminance0.0176 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311158 #385811
analogous
#111558 #311158 #541158
triadic
#311158 #583111 #115831
tetradic
#311158 #581115 #385811 #115854
square
#311158 #581115 #385811 #115854
split-complementary
#311158 #585411 #155811
monochromatic
#0E051A #140725 #311158 #4E1B8B #6A25BF

Accessibility & contrast

On white

15.54
#311158 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.35
#311158 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311158
15.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311158#FFFFFF#000000##FFFFFF
##3111581.0015.541.3515.54
#FFFFFF15.541.0021.001.00
#0000001.3521.001.0021.00
##FFFFFF15.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00245A
Deuteranopia (green-blind)
#002357
Tritanopia (blue-blind)
#272333
Achromatopsia (no color)
#242424

Design tokens & code

CSS
--color: #311158;
/* rgb */ color: rgb(49, 17, 88);
/* oklch */ color: oklch(27.4% 0.119 298.7);
Tailwind
colors: {
  custom: {
    50: '#6e5388',
    500: '#311158',
    950: '#000000',
  },
}
SCSS
$custom: #311158;
$custom-light: #6e5388;
$custom-dark: #000000;
JSON
{
  "hex": "#311158",
  "rgb": {
    "r": 49,
    "g": 17,
    "b": 88
  },
  "hsl": {
    "h": 267.042,
    "s": 67.619,
    "l": 20.588
  },
  "oklch": {
    "l": 0.2744,
    "c": 0.11858,
    "h": 298.7
  },
  "luminance": 0.01758
}

Semantic roles & 50–950 ramp

primary
#311158
secondary
#679134
accent
#EA3D9C
background
#F6F4F8
surface
#ECE7F0
border
#C7C3CB
text
#07020B
muted
#7A787C

Preview Lab

Preview with #311158

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

Preview Lab → · Contrast checker → · Palette generator →

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