#331970#331970

#331970 is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.1% C 0.139 H 289.4°. Best body text is #FFFFFF at 13.87:1 contrast (WCAG AA passes).

Color values

HEX#331970
RGBrgb(51, 25, 112)
HSLhsl(258, 64%, 27%)
HSVhsv(258, 78%, 44%)
CMYKcmyk(54.5%, 77.7%, 0%, 56.1%)
CIE-LABlab(18.23, 35.17, -45.59)
CIE-LCHlch(18.23, 57.58, 307.64°)
OKLaboklab(31.08% 0.0461 -0.131)
OKLCHoklch(31.08% 0.139 289.4)
XYZxyz(4.6367, 2.5687, 15.5776)
Luminance0.0257 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331970 #567019
analogous
#192B70 #331970 #5F1970
triadic
#331970 #703319 #197033
tetradic
#331970 #70192B #567019 #19705F
square
#331970 #70192B #567019 #19705F
split-complementary
#331970 #705F19 #2B7019
monochromatic
#0B0619 #1C0E3E #331970 #4A24A2 #6232D1

Accessibility & contrast

On white

13.87
#331970 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.51
#331970 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331970
13.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331970#FFFFFF#000000##FFFFFF
##3319701.0013.871.5113.87
#FFFFFF13.871.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E73
Deuteranopia (green-blind)
#002A6E
Tritanopia (blue-blind)
#1C3143
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #331970;
/* rgb */ color: rgb(51, 25, 112);
/* oklch */ color: oklch(31.1% 0.139 289.4);
Tailwind
colors: {
  custom: {
    50: '#72599a',
    500: '#331970',
    950: '#000000',
  },
}
SCSS
$custom: #331970;
$custom-light: #72599a;
$custom-dark: #000000;
JSON
{
  "hex": "#331970",
  "rgb": {
    "r": 51,
    "g": 25,
    "b": 112
  },
  "hsl": {
    "h": 257.931,
    "s": 63.504,
    "l": 26.863
  },
  "oklch": {
    "l": 0.31075,
    "c": 0.13888,
    "h": 289.4
  },
  "luminance": 0.02569
}

Semantic roles & 50–950 ramp

primary
#331970
secondary
#87A540
accent
#E741B5
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #331970

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

Preview Lab → · Contrast checker → · Palette generator →

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