#5158D7#5158D7

#5158D7 is a mid, vivid blue. Relative luminance 0.136; OKLCH L 52.9% C 0.191 H 275.3°. Best body text is #FFFFFF at 5.63:1 contrast (WCAG AA passes).

Color values

HEX#5158D7
RGBrgb(81, 88, 215)
HSLhsl(237, 63%, 58%)
HSVhsv(237, 62%, 84%)
CMYKcmyk(62.3%, 59.1%, 0%, 15.7%)
CIE-LABlab(43.70, 35.76, -66.24)
CIE-LCHlch(43.70, 75.27, 298.36°)
OKLaboklab(52.9% 0.0178 -0.1906)
OKLCHoklch(52.9% 0.191 275.3)
XYZxyz(19.1448, 13.6335, 65.8994)
Luminance0.1363 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5158D7 #D7D051
analogous
#519BD7 #5158D7 #8D51D7
triadic
#5158D7 #D75158 #58D751
tetradic
#5158D7 #D7519B #D7D051 #51D78D
square
#5158D7 #D7519B #D7D051 #51D78D
split-complementary
#5158D7 #D78D51 #9BD751
monochromatic
#20268D #2C34BF #5158D7 #8388E2 #B5B8EE

Accessibility & contrast

On white

5.63
#5158D7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.73
#5158D7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5158D7
5.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5158D7#FFFFFF#000000##FFFFFF
##5158D71.005.633.735.63
#FFFFFF5.631.0021.001.00
#0000003.7321.001.0021.00
##FFFFFF5.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006DDB
Deuteranopia (green-blind)
#0062D4
Tritanopia (blue-blind)
#00778F
Achromatopsia (no color)
#676767

Design tokens & code

CSS
--color: #5158d7;
/* rgb */ color: rgb(81, 88, 215);
/* oklch */ color: oklch(52.9% 0.191 275.3);
Tailwind
colors: {
  custom: {
    50: '#8f87e4',
    500: '#5158d7',
    950: '#000000',
  },
}
SCSS
$custom: #5158d7;
$custom-light: #8f87e4;
$custom-dark: #000000;
JSON
{
  "hex": "#5158d7",
  "rgb": {
    "r": 81,
    "g": 88,
    "b": 215
  },
  "hsl": {
    "h": 236.866,
    "s": 62.617,
    "l": 58.039
  },
  "oklch": {
    "l": 0.529,
    "c": 0.19141,
    "h": 275.3
  },
  "luminance": 0.13635
}

Semantic roles & 50–950 ramp

primary
#5158D7
secondary
#DDDAA7
accent
#DD42E6
background
#F9F8FE
surface
#F2EFFC
border
#CCCAD5
text
#0E0B16
muted
#7E7C84

Preview Lab

Preview with #5158D7

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

Preview Lab → · Contrast checker → · Palette generator →

#5158D7 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva