#381F87#381F87

#381F87 is a dark, vivid violet. Relative luminance 0.036; OKLCH L 34.7% C 0.160 H 285.5°. Best body text is #FFFFFF at 12.25:1 contrast (WCAG AA passes).

Color values

HEX#381F87
RGBrgb(56, 31, 135)
HSLhsl(254, 63%, 33%)
HSVhsv(254, 77%, 53%)
CMYKcmyk(58.5%, 77%, 0%, 47.1%)
CIE-LABlab(22.19, 39.76, -53.71)
CIE-LCHlch(22.19, 66.83, 306.51°)
OKLaboklab(34.7% 0.0428 -0.1547)
OKLCHoklch(34.7% 0.16 285.5)
XYZxyz(6.4927, 3.5696, 23.2639)
Luminance0.0357 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#381F87 #6E871F
analogous
#1F3A87 #381F87 #6C1F87
triadic
#381F87 #87381F #1F8738
tetradic
#381F87 #871F3A #6E871F #1F876C
square
#381F87 #871F3A #6E871F #1F876C
split-complementary
#381F87 #876C1F #3A871F
monochromatic
#0F0823 #231455 #381F87 #4D2AB9 #6C4BD6

Accessibility & contrast

On white

12.25
#381F87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.71
#381F87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #381F87
12.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##381F87#FFFFFF#000000##FFFFFF
##381F871.0012.251.7112.25
#FFFFFF12.251.0021.001.00
#0000001.7121.001.0021.00
##FFFFFF12.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388A
Deuteranopia (green-blind)
#003285
Tritanopia (blue-blind)
#103C51
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #381f87;
/* rgb */ color: rgb(56, 31, 135);
/* oklch */ color: oklch(34.7% 0.160 285.5);
Tailwind
colors: {
  custom: {
    50: '#785eab',
    500: '#381f87',
    950: '#000000',
  },
}
SCSS
$custom: #381f87;
$custom-light: #785eab;
$custom-dark: #000000;
JSON
{
  "hex": "#381f87",
  "rgb": {
    "r": 56,
    "g": 31,
    "b": 135
  },
  "hsl": {
    "h": 254.423,
    "s": 62.651,
    "l": 32.549
  },
  "oklch": {
    "l": 0.34695,
    "c": 0.16049,
    "h": 285.5
  },
  "luminance": 0.0357
}

Semantic roles & 50–950 ramp

primary
#381F87
secondary
#9EB84A
accent
#E642BE
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #381F87

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

Preview Lab → · Contrast checker → · Palette generator →

#381F87 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva