#331F61#331F61

#331F61 is a dark, moderate violet. Relative luminance 0.025; OKLCH L 30.6% C 0.111 H 292.5°. Best body text is #FFFFFF at 13.91:1 contrast (WCAG AA passes).

Color values

HEX#331F61
RGBrgb(51, 31, 97)
HSLhsl(258, 52%, 25%)
HSVhsv(258, 68%, 38%)
CMYKcmyk(47.4%, 68%, 0%, 62%)
CIE-LABlab(18.13, 26.99, -35.93)
CIE-LCHlch(18.13, 44.94, 306.91°)
OKLaboklab(30.58% 0.0426 -0.1027)
OKLCHoklch(30.58% 0.111 292.5)
XYZxyz(4.0123, 2.5467, 11.5871)
Luminance0.0255 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F61 #4D611F
analogous
#1F2C61 #331F61 #541F61
triadic
#331F61 #61331F #1F6133
tetradic
#331F61 #611F2C #4D611F #1F6154
square
#331F61 #611F2C #4D611F #1F6154
split-complementary
#331F61 #61541F #2C611F
monochromatic
#0C0717 #1B1033 #331F61 #4B2E8F #643DBE

Accessibility & contrast

On white

13.91
#331F61 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.51
#331F61 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F61
13.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F61#FFFFFF#000000##FFFFFF
##331F611.0013.911.5113.91
#FFFFFF13.911.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002D63
Deuteranopia (green-blind)
#002B60
Tritanopia (blue-blind)
#262E3D
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #331f61;
/* rgb */ color: rgb(51, 31, 97);
/* oklch */ color: oklch(30.6% 0.111 292.5);
Tailwind
colors: {
  custom: {
    50: '#6f5c8e',
    500: '#331f61',
    950: '#000000',
  },
}
SCSS
$custom: #331f61;
$custom-light: #6f5c8e;
$custom-dark: #000000;
JSON
{
  "hex": "#331f61",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 97
  },
  "hsl": {
    "h": 258.182,
    "s": 51.563,
    "l": 25.098
  },
  "oklch": {
    "l": 0.30581,
    "c": 0.11117,
    "h": 292.5
  },
  "luminance": 0.02547
}

Semantic roles & 50–950 ramp

primary
#331F61
secondary
#7E9646
accent
#DB4DB0
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#08040C
muted
#7B797D

Preview Lab

Preview with #331F61

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

Preview Lab → · Contrast checker → · Palette generator →

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