#331F65#331F65

#331F65 is a dark, moderate violet. Relative luminance 0.026; OKLCH L 30.9% C 0.117 H 291.2°. Best body text is #FFFFFF at 13.77:1 contrast (WCAG AA passes).

Color values

HEX#331F65
RGBrgb(51, 31, 101)
HSLhsl(257, 53%, 26%)
HSVhsv(257, 69%, 40%)
CMYKcmyk(49.5%, 69.3%, 0%, 60.4%)
CIE-LABlab(18.47, 28.25, -38.02)
CIE-LCHlch(18.47, 47.37, 306.62°)
OKLaboklab(30.93% 0.0421 -0.1088)
OKLCHoklch(30.93% 0.117 291.2)
XYZxyz(4.2035, 2.6232, 12.5942)
Luminance0.0262 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F65 #51651F
analogous
#1F2E65 #331F65 #561F65
triadic
#331F65 #65331F #1F6533
tetradic
#331F65 #651F2E #51651F #1F6556
square
#331F65 #651F2E #51651F #1F6556
split-complementary
#331F65 #65561F #2E651F
monochromatic
#0C0717 #1B1136 #331F65 #4B2D94 #623CC3

Accessibility & contrast

On white

13.77
#331F65 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331F65
13.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F65#FFFFFF#000000##FFFFFF
##331F651.0013.771.5213.77
#FFFFFF13.771.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E67
Deuteranopia (green-blind)
#002B64
Tritanopia (blue-blind)
#24303F
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #331f65;
/* rgb */ color: rgb(51, 31, 101);
/* oklch */ color: oklch(30.9% 0.117 291.2);
Tailwind
colors: {
  custom: {
    50: '#705c91',
    500: '#331f65',
    950: '#000000',
  },
}
SCSS
$custom: #331f65;
$custom-light: #705c91;
$custom-dark: #000000;
JSON
{
  "hex": "#331f65",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 101
  },
  "hsl": {
    "h": 257.143,
    "s": 53.03,
    "l": 25.882
  },
  "oklch": {
    "l": 0.30932,
    "c": 0.11669,
    "h": 291.2
  },
  "luminance": 0.02623
}

Semantic roles & 50–950 ramp

primary
#331F65
secondary
#829946
accent
#DC4BB3
background
#F7F5F9
surface
#EDE9F1
border
#C8C5CB
text
#08040D
muted
#7B797E

Preview Lab

Preview with #331F65

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

Preview Lab → · Contrast checker → · Palette generator →

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