#331F7E#331F7E

#331F7E is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.3% C 0.150 H 284.4°. Best body text is #FFFFFF at 12.82:1 contrast (WCAG AA passes).

Color values

HEX#331F7E
RGBrgb(51, 31, 126)
HSLhsl(253, 61%, 31%)
HSVhsv(253, 75%, 49%)
CMYKcmyk(59.5%, 75.4%, 0%, 50.6%)
CIE-LABlab(20.79, 36.22, -50.36)
CIE-LCHlch(20.79, 62.04, 305.72°)
OKLaboklab(33.31% 0.0374 -0.145)
OKLCHoklch(33.31% 0.15 284.4)
XYZxyz(5.6200, 3.1898, 20.0542)
Luminance0.0319 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F7E #6A7E1F
analogous
#1F3A7E #331F7E #621F7E
triadic
#331F7E #7E331F #1F7E33
tetradic
#331F7E #7E1F3A #6A7E1F #1F7E62
square
#331F7E #7E1F3A #6A7E1F #1F7E62
split-complementary
#331F7E #7E621F #3A7E1F
monochromatic
#0B071C #1F134D #331F7E #472BAF #6346D1

Accessibility & contrast

On white

12.82
#331F7E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#331F7E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F7E
12.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F7E#FFFFFF#000000##FFFFFF
##331F7E1.0012.821.6412.82
#FFFFFF12.821.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003581
Deuteranopia (green-blind)
#002F7C
Tritanopia (blue-blind)
#0B394C
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #331f7e;
/* rgb */ color: rgb(51, 31, 126);
/* oklch */ color: oklch(33.3% 0.150 284.4);
Tailwind
colors: {
  custom: {
    50: '#745da4',
    500: '#331f7e',
    950: '#000000',
  },
}
SCSS
$custom: #331f7e;
$custom-light: #745da4;
$custom-dark: #000000;
JSON
{
  "hex": "#331f7e",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 126
  },
  "hsl": {
    "h": 252.632,
    "s": 60.51,
    "l": 30.784
  },
  "oklch": {
    "l": 0.33307,
    "c": 0.14976,
    "h": 284.4
  },
  "luminance": 0.0319
}

Semantic roles & 50–950 ramp

primary
#331F7E
secondary
#9BB148
accent
#E444C2
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331F7E

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

Preview Lab → · Contrast checker → · Palette generator →

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