#331F7B#331F7B

#331F7B is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.0% C 0.146 H 285.1°. Best body text is #FFFFFF at 12.94:1 contrast (WCAG AA passes).

Color values

HEX#331F7B
RGBrgb(51, 31, 123)
HSLhsl(253, 60%, 30%)
HSVhsv(253, 75%, 48%)
CMYKcmyk(58.5%, 74.8%, 0%, 51.8%)
CIE-LABlab(20.49, 35.27, -48.94)
CIE-LCHlch(20.49, 60.32, 305.78°)
OKLaboklab(33.01% 0.0381 -0.1409)
OKLCHoklch(33.01% 0.146 285.1)
XYZxyz(5.4293, 3.1135, 19.0499)
Luminance0.0311 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F7B #677B1F
analogous
#1F397B #331F7B #611F7B
triadic
#331F7B #7B331F #1F7B33
tetradic
#331F7B #7B1F39 #677B1F #1F7B61
square
#331F7B #7B1F39 #677B1F #1F7B61
split-complementary
#331F7B #7B611F #397B1F
monochromatic
#0A0619 #1F134A #331F7B #472BAC #6344D0

Accessibility & contrast

On white

12.94
#331F7B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#331F7B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F7B
12.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F7B#FFFFFF#000000##FFFFFF
##331F7B1.0012.941.6212.94
#FFFFFF12.941.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00347E
Deuteranopia (green-blind)
#002F79
Tritanopia (blue-blind)
#10384B
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331f7b;
/* rgb */ color: rgb(51, 31, 123);
/* oklch */ color: oklch(33.0% 0.146 285.1);
Tailwind
colors: {
  custom: {
    50: '#745da2',
    500: '#331f7b',
    950: '#000000',
  },
}
SCSS
$custom: #331f7b;
$custom-light: #745da2;
$custom-dark: #000000;
JSON
{
  "hex": "#331f7b",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 123
  },
  "hsl": {
    "h": 253.043,
    "s": 59.74,
    "l": 30.196
  },
  "oklch": {
    "l": 0.33008,
    "c": 0.14592,
    "h": 285.1
  },
  "luminance": 0.03114
}

Semantic roles & 50–950 ramp

primary
#331F7B
secondary
#98AE48
accent
#E345C1
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331F7B

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

Preview Lab → · Contrast checker → · Palette generator →

#331F7B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva