#5158D4#5158D4

#5158D4 is a mid, vivid blue. Relative luminance 0.135; OKLCH L 52.7% C 0.187 H 275.4°. Best body text is #FFFFFF at 5.68:1 contrast (WCAG AA passes).

Color values

HEX#5158D4
RGBrgb(81, 88, 212)
HSLhsl(237, 60%, 57%)
HSVhsv(237, 62%, 83%)
CMYKcmyk(61.8%, 58.5%, 0%, 16.9%)
CIE-LABlab(43.48, 34.76, -64.89)
CIE-LCHlch(43.48, 73.61, 298.18°)
OKLaboklab(52.66% 0.0178 -0.1866)
OKLCHoklch(52.66% 0.187 275.4)
XYZxyz(18.7628, 13.4807, 63.8879)
Luminance0.1348 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5158D4 #D4CD51
analogous
#5199D4 #5158D4 #8C51D4
triadic
#5158D4 #D45158 #58D451
tetradic
#5158D4 #D45199 #D4CD51 #51D48C
square
#5158D4 #D45199 #D4CD51 #51D48C
split-complementary
#5158D4 #D48C51 #99D451
monochromatic
#222789 #2E35BA #5158D4 #8287E0 #B3B6EC

Accessibility & contrast

On white

5.68
#5158D4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.70
#5158D4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5158D4
5.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5158D4#FFFFFF#000000##FFFFFF
##5158D41.005.683.705.68
#FFFFFF5.681.0021.001.00
#0000003.7021.001.0021.00
##FFFFFF5.681.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5158d4;
/* rgb */ color: rgb(81, 88, 212);
/* oklch */ color: oklch(52.7% 0.187 275.4);
Tailwind
colors: {
  custom: {
    50: '#8f87e2',
    500: '#5158d4',
    950: '#000000',
  },
}
SCSS
$custom: #5158d4;
$custom-light: #8f87e2;
$custom-dark: #000000;
JSON
{
  "hex": "#5158d4",
  "rgb": {
    "r": 81,
    "g": 88,
    "b": 212
  },
  "hsl": {
    "h": 236.794,
    "s": 60.369,
    "l": 57.451
  },
  "oklch": {
    "l": 0.52664,
    "c": 0.18745,
    "h": 275.4
  },
  "luminance": 0.13482
}

Semantic roles & 50–950 ramp

primary
#5158D4
secondary
#DBD8A6
accent
#DB44E4
background
#F9F8FE
surface
#F2EFFC
border
#CCCAD5
text
#0E0B15
muted
#7E7C84

Preview Lab

Preview with #5158D4

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

Preview Lab → · Contrast checker → · Palette generator →

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