#5142B2#5142B2

#5142B2 is a mid, vivid blue. Relative luminance 0.089; OKLCH L 46.1% C 0.170 H 283.6°. Best body text is #FFFFFF at 7.58:1 contrast (WCAG AA passes).

Color values

HEX#5142B2
RGBrgb(81, 66, 178)
HSLhsl(248, 46%, 48%)
HSVhsv(248, 63%, 70%)
CMYKcmyk(54.5%, 62.9%, 0%, 30.2%)
CIE-LABlab(35.71, 37.17, -57.71)
CIE-LCHlch(35.71, 68.64, 302.79°)
OKLaboklab(46.14% 0.04 -0.1656)
OKLCHoklch(46.14% 0.17 283.6)
XYZxyz(13.3750, 8.8593, 43.1161)
Luminance0.0886 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5142B2 #A3B242
analogous
#426BB2 #5142B2 #8942B2
triadic
#5142B2 #B25142 #42B251
tetradic
#5142B2 #B2426B #A3B242 #42B289
square
#5142B2 #B2426B #A3B242 #42B289
split-complementary
#5142B2 #B28942 #6BB242
monochromatic
#282159 #3D3185 #5142B2 #766AC8 #9F96D8

Accessibility & contrast

On white

7.58
#5142B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.77
#5142B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5142B2
7.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5142B2#FFFFFF#000000##FFFFFF
##5142B21.007.582.777.58
#FFFFFF7.581.0021.001.00
#0000002.7721.001.0021.00
##FFFFFF7.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0057B6
Deuteranopia (green-blind)
#0050B0
Tritanopia (blue-blind)
#265D74
Achromatopsia (no color)
#545454

Design tokens & code

CSS
--color: #5142b2;
/* rgb */ color: rgb(81, 66, 178);
/* oklch */ color: oklch(46.1% 0.170 283.6);
Tailwind
colors: {
  custom: {
    50: '#8b77ca',
    500: '#5142b2',
    950: '#000000',
  },
}
SCSS
$custom: #5142b2;
$custom-light: #8b77ca;
$custom-dark: #000000;
JSON
{
  "hex": "#5142b2",
  "rgb": {
    "r": 81,
    "g": 66,
    "b": 178
  },
  "hsl": {
    "h": 248.036,
    "s": 45.902,
    "l": 47.843
  },
  "oklch": {
    "l": 0.46138,
    "c": 0.17038,
    "h": 283.6
  },
  "luminance": 0.0886
}

Semantic roles & 50–950 ramp

primary
#5142B2
secondary
#BCC48C
accent
#D652C4
background
#F9F7FC
surface
#F1EDF8
border
#CBC8D1
text
#0D0913
muted
#7E7B82

Preview Lab

Preview with #5142B2

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

Preview Lab → · Contrast checker → · Palette generator →

#5142B2 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva