#5158F2#5158F2

#5158F2 is a mid, highly saturated blue. Relative luminance 0.151; OKLCH L 55.1% C 0.226 H 274.2°. Best body text is #FFFFFF at 5.21:1 contrast (WCAG AA passes).

Color values

HEX#5158F2
RGBrgb(81, 88, 242)
HSLhsl(237, 86%, 63%)
HSVhsv(237, 67%, 95%)
CMYKcmyk(66.5%, 63.6%, 0%, 5.1%)
CIE-LABlab(45.82, 44.67, -78.07)
CIE-LCHlch(45.82, 89.95, 299.78°)
OKLaboklab(55.12% 0.0165 -0.2253)
OKLCHoklch(55.12% 0.226 274.2)
XYZxyz(22.9048, 15.1375, 85.7019)
Luminance0.1514 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5158F2 #F2EB51
analogous
#51A9F2 #5158F2 #9A51F2
triadic
#5158F2 #F25158 #58F251
tetradic
#5158F2 #F251A9 #F2EB51 #51F29A
square
#5158F2 #F251A9 #F2EB51 #51F29A
split-complementary
#5158F2 #F29A51 #A9F251
monochromatic
#0E15BB #1821EE #5158F2 #8A8FF6 #C3C5FB

Accessibility & contrast

On white

5.21
#5158F2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.03
#5158F2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5158F2
5.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5158F2#FFFFFF#000000##FFFFFF
##5158F21.005.214.035.21
#FFFFFF5.211.0021.001.00
#0000004.0321.001.0021.00
##FFFFFF5.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0074F7
Deuteranopia (green-blind)
#0065EF
Tritanopia (blue-blind)
#00809D
Achromatopsia (no color)
#6C6C6C

Design tokens & code

CSS
--color: #5158f2;
/* rgb */ color: rgb(81, 88, 242);
/* oklch */ color: oklch(55.1% 0.226 274.2);
Tailwind
colors: {
  custom: {
    50: '#9487f7',
    500: '#5158f2',
    950: '#000000',
  },
}
SCSS
$custom: #5158f2;
$custom-light: #9487f7;
$custom-dark: #000000;
JSON
{
  "hex": "#5158f2",
  "rgb": {
    "r": 81,
    "g": 88,
    "b": 242
  },
  "hsl": {
    "h": 237.391,
    "s": 86.096,
    "l": 63.333
  },
  "oklch": {
    "l": 0.55116,
    "c": 0.22591,
    "h": 274.2
  },
  "luminance": 0.1514
}

Semantic roles & 50–950 ramp

primary
#5158F2
secondary
#ECEAB3
accent
#D903E3
background
#FAF8FF
surface
#F3EFFF
border
#CDCAD7
text
#0F0B17
muted
#7F7C85

Preview Lab

Preview with #5158F2

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

Preview Lab → · Contrast checker → · Palette generator →

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