#5138BF#5138BF

#5138BF is a mid, vivid violet. Relative luminance 0.083; OKLCH L 45.7% C 0.199 H 283.7°. Best body text is #FFFFFF at 7.87:1 contrast (WCAG AA passes).

Color values

HEX#5138BF
RGBrgb(81, 56, 191)
HSLhsl(251, 55%, 48%)
HSVhsv(251, 71%, 75%)
CMYKcmyk(57.6%, 70.7%, 0%, 25.1%)
CIE-LABlab(34.68, 46.92, -67.07)
CIE-LCHlch(34.68, 81.85, 304.98°)
OKLaboklab(45.73% 0.0472 -0.1931)
OKLCHoklch(45.73% 0.199 283.7)
XYZxyz(14.2086, 8.3384, 50.1409)
Luminance0.0834 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5138BF #A6BF38
analogous
#3862BF #5138BF #9438BF
triadic
#5138BF #BF5138 #38BF51
tetradic
#5138BF #BF3862 #A6BF38 #38BF94
square
#5138BF #BF3862 #A6BF38 #38BF94
split-complementary
#5138BF #BF9438 #62BF38
monochromatic
#291C60 #3D2A90 #5138BF #7763D1 #A192DF

Accessibility & contrast

On white

7.87
#5138BF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.67
#5138BF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5138BF
7.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5138BF#FFFFFF#000000##FFFFFF
##5138BF1.007.872.677.87
#FFFFFF7.871.0021.001.00
#0000002.6721.001.0021.00
##FFFFFF7.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0056C3
Deuteranopia (green-blind)
#004DBC
Tritanopia (blue-blind)
#145C77
Achromatopsia (no color)
#525252

Design tokens & code

CSS
--color: #5138bf;
/* rgb */ color: rgb(81, 56, 191);
/* oklch */ color: oklch(45.7% 0.199 283.7);
Tailwind
colors: {
  custom: {
    50: '#8e71d3',
    500: '#5138bf',
    950: '#000000',
  },
}
SCSS
$custom: #5138bf;
$custom-light: #8e71d3;
$custom-dark: #000000;
JSON
{
  "hex": "#5138bf",
  "rgb": {
    "r": 81,
    "g": 56,
    "b": 191
  },
  "hsl": {
    "h": 251.111,
    "s": 54.656,
    "l": 48.431
  },
  "oklch": {
    "l": 0.45729,
    "c": 0.19879,
    "h": 283.7
  },
  "luminance": 0.08339
}

Semantic roles & 50–950 ramp

primary
#5138BF
secondary
#BECA89
accent
#DE4AC3
background
#F9F6FD
surface
#F2ECFA
border
#CCC7D3
text
#0D0814
muted
#7E7B83

Preview Lab

Preview with #5138BF

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

Preview Lab → · Contrast checker → · Palette generator →

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