#331F66#331F66

#331F66 is a dark, moderate violet. Relative luminance 0.026; OKLCH L 31.0% C 0.118 H 290.8°. Best body text is #FFFFFF at 13.74:1 contrast (WCAG AA passes).

Color values

HEX#331F66
RGBrgb(51, 31, 102)
HSLhsl(257, 53%, 26%)
HSVhsv(257, 70%, 40%)
CMYKcmyk(50%, 69.6%, 0%, 60%)
CIE-LABlab(18.55, 28.57, -38.54)
CIE-LCHlch(18.55, 47.97, 306.55°)
OKLaboklab(31.02% 0.042 -0.1103)
OKLCHoklch(31.02% 0.118 290.8)
XYZxyz(4.2528, 2.6429, 12.8539)
Luminance0.0264 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F66 #52661F
analogous
#1F2E66 #331F66 #561F66
triadic
#331F66 #66331F #1F6633
tetradic
#331F66 #661F2E #52661F #1F6656
square
#331F66 #661F2E #52661F #1F6656
split-complementary
#331F66 #66561F #2E661F
monochromatic
#0C0717 #1C1137 #331F66 #4A2D95 #623CC4

Accessibility & contrast

On white

13.74
#331F66 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#331F66 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F66
13.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F66#FFFFFF#000000##FFFFFF
##331F661.0013.741.5313.74
#FFFFFF13.741.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E68
Deuteranopia (green-blind)
#002C65
Tritanopia (blue-blind)
#23303F
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #331f66;
/* rgb */ color: rgb(51, 31, 102);
/* oklch */ color: oklch(31.0% 0.118 290.8);
Tailwind
colors: {
  custom: {
    50: '#705c92',
    500: '#331f66',
    950: '#000000',
  },
}
SCSS
$custom: #331f66;
$custom-light: #705c92;
$custom-dark: #000000;
JSON
{
  "hex": "#331f66",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 102
  },
  "hsl": {
    "h": 256.901,
    "s": 53.383,
    "l": 26.078
  },
  "oklch": {
    "l": 0.31021,
    "c": 0.11806,
    "h": 290.8
  },
  "luminance": 0.02643
}

Semantic roles & 50–950 ramp

primary
#331F66
secondary
#839A46
accent
#DD4BB4
background
#F7F5F9
surface
#EDE9F1
border
#C8C5CB
text
#08040D
muted
#7B797E

Preview Lab

Preview with #331F66

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

Preview Lab → · Contrast checker → · Palette generator →

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