#331F68#331F68

#331F68 is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.2% C 0.121 H 290.2°. Best body text is #FFFFFF at 13.67:1 contrast (WCAG AA passes).

Color values

HEX#331F68
RGBrgb(51, 31, 104)
HSLhsl(256, 54%, 26%)
HSVhsv(256, 70%, 41%)
CMYKcmyk(51%, 70.2%, 0%, 59.2%)
CIE-LABlab(18.73, 29.21, -39.56)
CIE-LCHlch(18.73, 49.18, 306.44°)
OKLaboklab(31.2% 0.0417 -0.1133)
OKLCHoklch(31.2% 0.121 290.2)
XYZxyz(4.3532, 2.6831, 13.3825)
Luminance0.0268 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F68 #54681F
analogous
#1F3068 #331F68 #581F68
triadic
#331F68 #68331F #1F6833
tetradic
#331F68 #681F30 #54681F #1F6858
square
#331F68 #681F30 #54681F #1F6858
split-complementary
#331F68 #68581F #30681F
monochromatic
#0C0718 #1C1139 #331F68 #4A2D97 #623CC5

Accessibility & contrast

On white

13.67
#331F68 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#331F68 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F68
13.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F68#FFFFFF#000000##FFFFFF
##331F681.0013.671.5413.67
#FFFFFF13.671.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F6A
Deuteranopia (green-blind)
#002C67
Tritanopia (blue-blind)
#223140
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #331f68;
/* rgb */ color: rgb(51, 31, 104);
/* oklch */ color: oklch(31.2% 0.121 290.2);
Tailwind
colors: {
  custom: {
    50: '#705c94',
    500: '#331f68',
    950: '#000000',
  },
}
SCSS
$custom: #331f68;
$custom-light: #705c94;
$custom-dark: #000000;
JSON
{
  "hex": "#331f68",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 104
  },
  "hsl": {
    "h": 256.438,
    "s": 54.074,
    "l": 26.471
  },
  "oklch": {
    "l": 0.31201,
    "c": 0.12078,
    "h": 290.2
  },
  "luminance": 0.02683
}

Semantic roles & 50–950 ramp

primary
#331F68
secondary
#859C46
accent
#DD4AB5
background
#F7F5F9
surface
#EDE9F1
border
#C8C5CB
text
#08040D
muted
#7B797E

Preview Lab

Preview with #331F68

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

Preview Lab → · Contrast checker → · Palette generator →

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