#331B62#331B62

#331B62 is a dark, moderate violet. Relative luminance 0.024; OKLCH L 30.0% C 0.118 H 293.5°. Best body text is #FFFFFF at 14.25:1 contrast (WCAG AA passes).

Color values

HEX#331B62
RGBrgb(51, 27, 98)
HSLhsl(260, 57%, 25%)
HSVhsv(260, 72%, 38%)
CMYKcmyk(48%, 72.4%, 0%, 61.6%)
CIE-LABlab(17.32, 29.74, -37.91)
CIE-LCHlch(17.32, 48.19, 308.11°)
OKLaboklab(30.02% 0.0472 -0.1085)
OKLCHoklch(30.02% 0.118 293.5)
XYZxyz(3.9612, 2.3694, 11.8015)
Luminance0.0237 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B62 #4A621B
analogous
#1B2662 #331B62 #571B62
triadic
#331B62 #62331B #1B6233
tetradic
#331B62 #621B26 #4A621B #1B6257
square
#331B62 #621B26 #4A621B #1B6257
split-complementary
#331B62 #62571B #26621B
monochromatic
#0C0718 #1A0E32 #331B62 #4C2892 #6535C2

Accessibility & contrast

On white

14.25
#331B62 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#331B62 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B62
14.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B62#FFFFFF#000000##FFFFFF
##331B621.0014.251.4714.25
#FFFFFF14.251.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B64
Deuteranopia (green-blind)
#002961
Tritanopia (blue-blind)
#252C3C
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #331b62;
/* rgb */ color: rgb(51, 27, 98);
/* oklch */ color: oklch(30.0% 0.118 293.5);
Tailwind
colors: {
  custom: {
    50: '#70598f',
    500: '#331b62',
    950: '#000000',
  },
}
SCSS
$custom: #331b62;
$custom-light: #70598f;
$custom-dark: #000000;
JSON
{
  "hex": "#331b62",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 98
  },
  "hsl": {
    "h": 260.282,
    "s": 56.8,
    "l": 24.51
  },
  "oklch": {
    "l": 0.30023,
    "c": 0.1183,
    "h": 293.5
  },
  "luminance": 0.0237
}

Semantic roles & 50–950 ramp

primary
#331B62
secondary
#7A9841
accent
#E048AD
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#08030C
muted
#7B787D

Preview Lab

Preview with #331B62

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

Preview Lab → · Contrast checker → · Palette generator →

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