#31166E#31166E

#31166E is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.3% C 0.140 H 289.2°. Best body text is #FFFFFF at 14.28:1 contrast (WCAG AA passes).

Color values

HEX#31166E
RGBrgb(49, 22, 110)
HSLhsl(258, 67%, 26%)
HSVhsv(258, 80%, 43%)
CMYKcmyk(55.5%, 80%, 0%, 56.9%)
CIE-LABlab(17.24, 35.82, -45.93)
CIE-LCHlch(17.24, 58.24, 307.95°)
OKLaboklab(30.26% 0.0459 -0.132)
OKLCHoklch(30.26% 0.14 289.2)
XYZxyz(4.3672, 2.3524, 14.9728)
Luminance0.0235 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31166E #536E16
analogous
#16276E #31166E #5D166E
triadic
#31166E #6E3116 #166E31
tetradic
#31166E #6E1627 #536E16 #166E5D
square
#31166E #6E1627 #536E16 #166E5D
split-complementary
#31166E #6E5D16 #276E16
monochromatic
#0B051A #1A0C3B #31166E #4820A1 #5E2AD4

Accessibility & contrast

On white

14.28
#31166E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#31166E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31166E
14.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31166E#FFFFFF#000000##FFFFFF
##31166E1.0014.281.4714.28
#FFFFFF14.281.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C70
Deuteranopia (green-blind)
#00286C
Tritanopia (blue-blind)
#1A2F41
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #31166e;
/* rgb */ color: rgb(49, 22, 110);
/* oklch */ color: oklch(30.3% 0.140 289.2);
Tailwind
colors: {
  custom: {
    50: '#715798',
    500: '#31166e',
    950: '#000000',
  },
}
SCSS
$custom: #31166e;
$custom-light: #715798;
$custom-dark: #000000;
JSON
{
  "hex": "#31166e",
  "rgb": {
    "r": 49,
    "g": 22,
    "b": 110
  },
  "hsl": {
    "h": 258.409,
    "s": 66.667,
    "l": 25.882
  },
  "oklch": {
    "l": 0.30264,
    "c": 0.1398,
    "h": 289.2
  },
  "luminance": 0.02353
}

Semantic roles & 50–950 ramp

primary
#31166E
secondary
#84A43C
accent
#EA3EB5
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #31166E

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

Preview Lab → · Contrast checker → · Palette generator →

#31166E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva