#331F63#331F63

#331F63 is a dark, moderate violet. Relative luminance 0.026; OKLCH L 30.8% C 0.114 H 291.8°. Best body text is #FFFFFF at 13.84:1 contrast (WCAG AA passes).

Color values

HEX#331F63
RGBrgb(51, 31, 99)
HSLhsl(258, 52%, 25%)
HSVhsv(258, 69%, 39%)
CMYKcmyk(48.5%, 68.7%, 0%, 61.2%)
CIE-LABlab(18.30, 27.62, -36.98)
CIE-LCHlch(18.30, 46.16, 306.76°)
OKLaboklab(30.76% 0.0424 -0.1058)
OKLCHoklch(30.76% 0.114 291.8)
XYZxyz(4.1067, 2.5845, 12.0844)
Luminance0.0259 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F63 #4F631F
analogous
#1F2D63 #331F63 #551F63
triadic
#331F63 #63331F #1F6333
tetradic
#331F63 #631F2D #4F631F #1F6355
square
#331F63 #631F2D #4F631F #1F6355
split-complementary
#331F63 #63551F #2D631F
monochromatic
#0C0717 #1B1034 #331F63 #4B2E92 #633CC0

Accessibility & contrast

On white

13.84
#331F63 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#331F63 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F63
13.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F63#FFFFFF#000000##FFFFFF
##331F631.0013.841.5213.84
#FFFFFF13.841.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.841.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E65
Deuteranopia (green-blind)
#002B62
Tritanopia (blue-blind)
#252F3E
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #331f63;
/* rgb */ color: rgb(51, 31, 99);
/* oklch */ color: oklch(30.8% 0.114 291.8);
Tailwind
colors: {
  custom: {
    50: '#6f5c90',
    500: '#331f63',
    950: '#000000',
  },
}
SCSS
$custom: #331f63;
$custom-light: #6f5c90;
$custom-dark: #000000;
JSON
{
  "hex": "#331f63",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 99
  },
  "hsl": {
    "h": 257.647,
    "s": 52.308,
    "l": 25.49
  },
  "oklch": {
    "l": 0.30755,
    "c": 0.11394,
    "h": 291.8
  },
  "luminance": 0.02585
}

Semantic roles & 50–950 ramp

primary
#331F63
secondary
#809846
accent
#DC4CB1
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#08040C
muted
#7B797D

Preview Lab

Preview with #331F63

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

Preview Lab → · Contrast checker → · Palette generator →

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