#331A74#331A74

#331A74 is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.6% C 0.143 H 288.0°. Best body text is #FFFFFF at 13.63:1 contrast (WCAG AA passes).

Color values

HEX#331A74
RGBrgb(51, 26, 116)
HSLhsl(257, 63%, 28%)
HSVhsv(257, 78%, 45%)
CMYKcmyk(56%, 77.6%, 0%, 54.5%)
CIE-LABlab(18.81, 35.85, -47.21)
CIE-LCHlch(18.81, 59.28, 307.21°)
OKLaboklab(31.61% 0.0441 -0.1358)
OKLCHoklch(31.61% 0.143 288)
XYZxyz(4.8861, 2.7033, 16.7839)
Luminance0.0270 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A74 #5B741A
analogous
#1A2E74 #331A74 #601A74
triadic
#331A74 #74331A #1A7433
tetradic
#331A74 #741A2E #5B741A #1A7460
square
#331A74 #741A2E #5B741A #1A7460
split-complementary
#331A74 #74601A #2E741A
monochromatic
#0B0619 #1D0F42 #331A74 #4925A6 #6236D2

Accessibility & contrast

On white

13.63
#331A74 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331A74
13.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A74#FFFFFF#000000##FFFFFF
##331A741.0013.631.5413.63
#FFFFFF13.631.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003077
Deuteranopia (green-blind)
#002B72
Tritanopia (blue-blind)
#193345
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #331a74;
/* rgb */ color: rgb(51, 26, 116);
/* oklch */ color: oklch(31.6% 0.143 288.0);
Tailwind
colors: {
  custom: {
    50: '#73599d',
    500: '#331a74',
    950: '#000000',
  },
}
SCSS
$custom: #331a74;
$custom-light: #73599d;
$custom-dark: #000000;
JSON
{
  "hex": "#331a74",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 116
  },
  "hsl": {
    "h": 256.667,
    "s": 63.38,
    "l": 27.843
  },
  "oklch": {
    "l": 0.3161,
    "c": 0.14275,
    "h": 288
  },
  "luminance": 0.02704
}

Semantic roles & 50–950 ramp

primary
#331A74
secondary
#8CA941
accent
#E641B9
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040E
muted
#7B797E

Preview Lab

Preview with #331A74

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

Preview Lab → · Contrast checker → · Palette generator →

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