#331E68#331E68

#331E68 is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.0% C 0.122 H 290.5°. Best body text is #FFFFFF at 13.76:1 contrast (WCAG AA passes).

Color values

HEX#331E68
RGBrgb(51, 30, 104)
HSLhsl(257, 55%, 26%)
HSVhsv(257, 71%, 41%)
CMYKcmyk(51%, 71.2%, 0%, 59.2%)
CIE-LABlab(18.50, 29.82, -39.93)
CIE-LCHlch(18.50, 49.83, 306.75°)
OKLaboklab(31.04% 0.0428 -0.1144)
OKLCHoklch(31.04% 0.122 290.5)
XYZxyz(4.3275, 2.6317, 13.3740)
Luminance0.0263 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331E68 #53681E
analogous
#1E2E68 #331E68 #581E68
triadic
#331E68 #68331E #1E6833
tetradic
#331E68 #681E2E #53681E #1E6858
square
#331E68 #681E2E #53681E #1E6858
split-complementary
#331E68 #68581E #2E681E
monochromatic
#0C0718 #1C1039 #331E68 #4A2C98 #623AC6

Accessibility & contrast

On white

13.76
#331E68 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331E68
13.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331E68#FFFFFF#000000##FFFFFF
##331E681.0013.761.5313.76
#FFFFFF13.761.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E6A
Deuteranopia (green-blind)
#002B67
Tritanopia (blue-blind)
#223040
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #331e68;
/* rgb */ color: rgb(51, 30, 104);
/* oklch */ color: oklch(31.0% 0.122 290.5);
Tailwind
colors: {
  custom: {
    50: '#705b94',
    500: '#331e68',
    950: '#000000',
  },
}
SCSS
$custom: #331e68;
$custom-light: #705b94;
$custom-dark: #000000;
JSON
{
  "hex": "#331e68",
  "rgb": {
    "r": 51,
    "g": 30,
    "b": 104
  },
  "hsl": {
    "h": 257.027,
    "s": 55.224,
    "l": 26.275
  },
  "oklch": {
    "l": 0.3104,
    "c": 0.12217,
    "h": 290.5
  },
  "luminance": 0.02632
}

Semantic roles & 50–950 ramp

primary
#331E68
secondary
#849D45
accent
#DF49B4
background
#F7F5F9
surface
#EDE9F1
border
#C8C5CB
text
#08040D
muted
#7B797E

Preview Lab

Preview with #331E68

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

Preview Lab → · Contrast checker → · Palette generator →

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