#5142AF#5142AF

#5142AF is a mid, vivid blue. Relative luminance 0.087; OKLCH L 45.9% C 0.166 H 284.0°. Best body text is #FFFFFF at 7.64:1 contrast (WCAG AA passes).

Color values

HEX#5142AF
RGBrgb(81, 66, 175)
HSLhsl(248, 45%, 47%)
HSVhsv(248, 62%, 69%)
CMYKcmyk(53.7%, 62.3%, 0%, 31.4%)
CIE-LABlab(35.48, 36.23, -56.31)
CIE-LCHlch(35.48, 66.96, 302.76°)
OKLaboklab(45.9% 0.0402 -0.1615)
OKLCHoklch(45.9% 0.166 284)
XYZxyz(13.0771, 8.7402, 41.5471)
Luminance0.0874 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5142AF #A0AF42
analogous
#426AAF #5142AF #8842AF
triadic
#5142AF #AF5142 #42AF51
tetradic
#5142AF #AF426A #A0AF42 #42AF88
square
#5142AF #AF426A #A0AF42 #42AF88
split-complementary
#5142AF #AF8842 #6AAF42
monochromatic
#282056 #3C3183 #5142AF #7568C6 #9E95D7

Accessibility & contrast

On white

7.64
#5142AF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.75
#5142AF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5142AF
7.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5142AF#FFFFFF#000000##FFFFFF
##5142AF1.007.642.757.64
#FFFFFF7.641.0021.001.00
#0000002.7521.001.0021.00
##FFFFFF7.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0057B3
Deuteranopia (green-blind)
#0050AD
Tritanopia (blue-blind)
#295C72
Achromatopsia (no color)
#535353

Design tokens & code

CSS
--color: #5142af;
/* rgb */ color: rgb(81, 66, 175);
/* oklch */ color: oklch(45.9% 0.166 284.0);
Tailwind
colors: {
  custom: {
    50: '#8a77c8',
    500: '#5142af',
    950: '#000000',
  },
}
SCSS
$custom: #5142af;
$custom-light: #8a77c8;
$custom-dark: #000000;
JSON
{
  "hex": "#5142af",
  "rgb": {
    "r": 81,
    "g": 66,
    "b": 175
  },
  "hsl": {
    "h": 248.257,
    "s": 45.228,
    "l": 47.255
  },
  "oklch": {
    "l": 0.45895,
    "c": 0.16643,
    "h": 284
  },
  "luminance": 0.08741
}

Semantic roles & 50–950 ramp

primary
#5142AF
secondary
#BBC28A
accent
#D553C3
background
#F8F7FC
surface
#F0EDF8
border
#CBC8D1
text
#0D0913
muted
#7D7B82

Preview Lab

Preview with #5142AF

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

Preview Lab → · Contrast checker → · Palette generator →

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