#331F6C#331F6C

#331F6C is a dark, vivid violet. Relative luminance 0.028; OKLCH L 31.6% C 0.126 H 289.0°. Best body text is #FFFFFF at 13.52:1 contrast (WCAG AA passes).

Color values

HEX#331F6C
RGBrgb(51, 31, 108)
HSLhsl(256, 55%, 27%)
HSVhsv(256, 71%, 42%)
CMYKcmyk(52.8%, 71.3%, 0%, 57.6%)
CIE-LABlab(19.08, 30.48, -41.59)
CIE-LCHlch(19.08, 51.57, 306.23°)
OKLaboklab(31.57% 0.0411 -0.1193)
OKLCHoklch(31.57% 0.126 289)
XYZxyz(4.5612, 2.7663, 14.4781)
Luminance0.0277 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F6C #586C1F
analogous
#1F326C #331F6C #591F6C
triadic
#331F6C #6C331F #1F6C33
tetradic
#331F6C #6C1F32 #586C1F #1F6C59
square
#331F6C #6C1F32 #586C1F #1F6C59
split-complementary
#331F6C #6C591F #326C1F
monochromatic
#0B0718 #1D113C #331F6C #492D9C #623EC8

Accessibility & contrast

On white

13.52
#331F6C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#331F6C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F6C
13.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F6C#FFFFFF#000000##FFFFFF
##331F6C1.0013.521.5513.52
#FFFFFF13.521.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00306E
Deuteranopia (green-blind)
#002C6A
Tritanopia (blue-blind)
#1F3242
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #331f6c;
/* rgb */ color: rgb(51, 31, 108);
/* oklch */ color: oklch(31.6% 0.126 289.0);
Tailwind
colors: {
  custom: {
    50: '#715c97',
    500: '#331f6c',
    950: '#000000',
  },
}
SCSS
$custom: #331f6c;
$custom-light: #715c97;
$custom-dark: #000000;
JSON
{
  "hex": "#331f6c",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 108
  },
  "hsl": {
    "h": 255.584,
    "s": 55.396,
    "l": 27.255
  },
  "oklch": {
    "l": 0.31567,
    "c": 0.1262,
    "h": 289
  },
  "luminance": 0.02766
}

Semantic roles & 50–950 ramp

primary
#331F6C
secondary
#89A047
accent
#DF49B8
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040D
muted
#7B797E

Preview Lab

Preview with #331F6C

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

Preview Lab → · Contrast checker → · Palette generator →

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