#5138BA#5138BA

#5138BA is a mid, vivid violet. Relative luminance 0.081; OKLCH L 45.3% C 0.193 H 284.5°. Best body text is #FFFFFF at 8.00:1 contrast (WCAG AA passes).

Color values

HEX#5138BA
RGBrgb(81, 56, 186)
HSLhsl(252, 54%, 47%)
HSVhsv(252, 70%, 73%)
CMYKcmyk(56.5%, 69.9%, 0%, 27.1%)
CIE-LABlab(34.24, 45.42, -64.85)
CIE-LCHlch(34.24, 79.17, 305.01°)
OKLaboklab(45.28% 0.0481 -0.1866)
OKLCHoklch(45.28% 0.193 284.5)
XYZxyz(13.6677, 8.1220, 47.2924)
Luminance0.0812 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5138BA #A1BA38
analogous
#3860BA #5138BA #9238BA
triadic
#5138BA #BA5138 #38BA51
tetradic
#5138BA #BA3860 #A1BA38 #38BA92
square
#5138BA #BA3860 #A1BA38 #38BA92
split-complementary
#5138BA #BA9238 #60BA38
monochromatic
#281C5C #3D2A8B #5138BA #7560CF #9E8FDD

Accessibility & contrast

On white

8.00
#5138BA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.62
#5138BA on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5138BA
8.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5138BA#FFFFFF#000000##FFFFFF
##5138BA1.008.002.628.00
#FFFFFF8.001.0021.001.00
#0000002.6221.001.0021.00
##FFFFFF8.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0054BE
Deuteranopia (green-blind)
#004CB8
Tritanopia (blue-blind)
#1D5A75
Achromatopsia (no color)
#505050

Design tokens & code

CSS
--color: #5138ba;
/* rgb */ color: rgb(81, 56, 186);
/* oklch */ color: oklch(45.3% 0.193 284.5);
Tailwind
colors: {
  custom: {
    50: '#8d71d0',
    500: '#5138ba',
    950: '#000000',
  },
}
SCSS
$custom: #5138ba;
$custom-light: #8d71d0;
$custom-dark: #000000;
JSON
{
  "hex": "#5138ba",
  "rgb": {
    "r": 81,
    "g": 56,
    "b": 186
  },
  "hsl": {
    "h": 251.538,
    "s": 53.719,
    "l": 47.451
  },
  "oklch": {
    "l": 0.45278,
    "c": 0.19271,
    "h": 284.5
  },
  "luminance": 0.08123
}

Semantic roles & 50–950 ramp

primary
#5138BA
secondary
#BBC886
accent
#DD4BC1
background
#F9F6FC
surface
#F1ECF9
border
#CBC7D2
text
#0D0814
muted
#7E7B82

Preview Lab

Preview with #5138BA

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

Preview Lab → · Contrast checker → · Palette generator →

#5138BA Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva