#5138BB#5138BB

#5138BB is a mid, vivid violet. Relative luminance 0.082; OKLCH L 45.4% C 0.194 H 284.3°. Best body text is #FFFFFF at 7.98:1 contrast (WCAG AA passes).

Color values

HEX#5138BB
RGBrgb(81, 56, 187)
HSLhsl(251, 54%, 48%)
HSVhsv(251, 70%, 73%)
CMYKcmyk(56.7%, 70.1%, 0%, 26.7%)
CIE-LABlab(34.32, 45.72, -65.30)
CIE-LCHlch(34.32, 79.71, 305.00°)
OKLaboklab(45.37% 0.048 -0.1879)
OKLCHoklch(45.37% 0.194 284.3)
XYZxyz(13.7744, 8.1647, 47.8542)
Luminance0.0817 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5138BB #A2BB38
analogous
#3861BB #5138BB #9238BB
triadic
#5138BB #BB5138 #38BB51
tetradic
#5138BB #BB3861 #A2BB38 #38BB92
square
#5138BB #BB3861 #A2BB38 #38BB92
split-complementary
#5138BB #BB9238 #61BB38
monochromatic
#281C5D #3D2A8C #5138BB #7661D0 #9F90DE

Accessibility & contrast

On white

7.98
#5138BB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.63
#5138BB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5138BB
7.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5138BB#FFFFFF#000000##FFFFFF
##5138BB1.007.982.637.98
#FFFFFF7.981.0021.001.00
#0000002.6321.001.0021.00
##FFFFFF7.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0055BF
Deuteranopia (green-blind)
#004CB8
Tritanopia (blue-blind)
#1C5B75
Achromatopsia (no color)
#515151

Design tokens & code

CSS
--color: #5138bb;
/* rgb */ color: rgb(81, 56, 187);
/* oklch */ color: oklch(45.4% 0.194 284.3);
Tailwind
colors: {
  custom: {
    50: '#8d71d1',
    500: '#5138bb',
    950: '#000000',
  },
}
SCSS
$custom: #5138bb;
$custom-light: #8d71d1;
$custom-dark: #000000;
JSON
{
  "hex": "#5138bb",
  "rgb": {
    "r": 81,
    "g": 56,
    "b": 187
  },
  "hsl": {
    "h": 251.45,
    "s": 53.909,
    "l": 47.647
  },
  "oklch": {
    "l": 0.45367,
    "c": 0.19393,
    "h": 284.3
  },
  "luminance": 0.08166
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #5138BB

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

Preview Lab → · Contrast checker → · Palette generator →

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