#5158D3#5158D3

#5158D3 is a mid, vivid blue. Relative luminance 0.134; OKLCH L 52.6% C 0.186 H 275.5°. Best body text is #FFFFFF at 5.70:1 contrast (WCAG AA passes).

Color values

HEX#5158D3
RGBrgb(81, 88, 211)
HSLhsl(237, 60%, 57%)
HSVhsv(237, 62%, 83%)
CMYKcmyk(61.6%, 58.3%, 0%, 17.3%)
CIE-LABlab(43.40, 34.43, -64.43)
CIE-LCHlch(43.40, 73.05, 298.11°)
OKLaboklab(52.59% 0.0178 -0.1853)
OKLCHoklch(52.59% 0.186 275.5)
XYZxyz(18.6371, 13.4304, 63.2256)
Luminance0.1343 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5158D3 #D3CC51
analogous
#5199D3 #5158D3 #8B51D3
triadic
#5158D3 #D35158 #58D351
tetradic
#5158D3 #D35199 #D3CC51 #51D38B
square
#5158D3 #D35199 #D3CC51 #51D38B
split-complementary
#5158D3 #D38B51 #99D351
monochromatic
#222887 #2F36B8 #5158D3 #8287DF #B3B6EC

Accessibility & contrast

On white

5.70
#5158D3 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.69
#5158D3 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5158D3
5.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5158D3#FFFFFF#000000##FFFFFF
##5158D31.005.703.695.70
#FFFFFF5.701.0021.001.00
#0000003.6921.001.0021.00
##FFFFFF5.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006CD7
Deuteranopia (green-blind)
#0061D1
Tritanopia (blue-blind)
#00768D
Achromatopsia (no color)
#676767

Design tokens & code

CSS
--color: #5158d3;
/* rgb */ color: rgb(81, 88, 211);
/* oklch */ color: oklch(52.6% 0.186 275.5);
Tailwind
colors: {
  custom: {
    50: '#8f87e1',
    500: '#5158d3',
    950: '#000000',
  },
}
SCSS
$custom: #5158d3;
$custom-light: #8f87e1;
$custom-dark: #000000;
JSON
{
  "hex": "#5158d3",
  "rgb": {
    "r": 81,
    "g": 88,
    "b": 211
  },
  "hsl": {
    "h": 236.769,
    "s": 59.633,
    "l": 57.255
  },
  "oklch": {
    "l": 0.52585,
    "c": 0.18612,
    "h": 275.5
  },
  "luminance": 0.13432
}

Semantic roles & 50–950 ramp

primary
#5158D3
secondary
#DAD7A6
accent
#DA45E3
background
#F9F8FD
surface
#F2EFFB
border
#CCCAD4
text
#0E0B15
muted
#7E7C83

Preview Lab

Preview with #5158D3

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

Preview Lab → · Contrast checker → · Palette generator →

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