#331F62#331F62

#331F62 is a dark, moderate violet. Relative luminance 0.026; OKLCH L 30.7% C 0.113 H 292.2°. Best body text is #FFFFFF at 13.88:1 contrast (WCAG AA passes).

Color values

HEX#331F62
RGBrgb(51, 31, 98)
HSLhsl(258, 52%, 25%)
HSVhsv(258, 68%, 38%)
CMYKcmyk(48%, 68.4%, 0%, 61.6%)
CIE-LABlab(18.21, 27.30, -36.46)
CIE-LCHlch(18.21, 45.55, 306.83°)
OKLaboklab(30.67% 0.0425 -0.1042)
OKLCHoklch(30.67% 0.113 292.2)
XYZxyz(4.0592, 2.5655, 11.8342)
Luminance0.0257 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F62 #4E621F
analogous
#1F2D62 #331F62 #541F62
triadic
#331F62 #62331F #1F6233
tetradic
#331F62 #621F2D #4E621F #1F6254
square
#331F62 #621F2D #4E621F #1F6254
split-complementary
#331F62 #62541F #2D621F
monochromatic
#0C0717 #1B1034 #331F62 #4B2E90 #633CBF

Accessibility & contrast

On white

13.88
#331F62 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331F62
13.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F62#FFFFFF#000000##FFFFFF
##331F621.0013.881.5113.88
#FFFFFF13.881.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002D64
Deuteranopia (green-blind)
#002B61
Tritanopia (blue-blind)
#252F3D
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #331f62;
/* rgb */ color: rgb(51, 31, 98);
/* oklch */ color: oklch(30.7% 0.113 292.2);
Tailwind
colors: {
  custom: {
    50: '#6f5c8f',
    500: '#331f62',
    950: '#000000',
  },
}
SCSS
$custom: #331f62;
$custom-light: #6f5c8f;
$custom-dark: #000000;
JSON
{
  "hex": "#331f62",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 98
  },
  "hsl": {
    "h": 257.91,
    "s": 51.938,
    "l": 25.294
  },
  "oklch": {
    "l": 0.30668,
    "c": 0.11256,
    "h": 292.2
  },
  "luminance": 0.02566
}

Semantic roles & 50–950 ramp

primary
#331F62
secondary
#7F9746
accent
#DB4CB1
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#08040C
muted
#7B797D

Preview Lab

Preview with #331F62

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

Preview Lab → · Contrast checker → · Palette generator →

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