#5157CA#5157CA

#5157CA is a mid, vivid blue. Relative luminance 0.128; OKLCH L 51.7% C 0.175 H 276.1°. Best body text is #FFFFFF at 5.89:1 contrast (WCAG AA passes).

Color values

HEX#5157CA
RGBrgb(81, 87, 202)
HSLhsl(237, 53%, 55%)
HSVhsv(237, 60%, 79%)
CMYKcmyk(59.9%, 56.9%, 0%, 20.8%)
CIE-LABlab(42.50, 32.05, -60.72)
CIE-LCHlch(42.50, 68.66, 297.83°)
OKLaboklab(51.71% 0.0187 -0.1743)
OKLCHoklch(51.71% 0.175 276.1)
XYZxyz(17.4587, 12.8287, 57.4218)
Luminance0.1283 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5157CA #CAC451
analogous
#5193CA #5157CA #8751CA
triadic
#5157CA #CA5157 #57CA51
tetradic
#5157CA #CA5193 #CAC451 #51CA87
square
#5157CA #CA5193 #CAC451 #51CA87
split-complementary
#5157CA #CA8751 #93CA51
monochromatic
#252A7B #343AAA #5157CA #8084D8 #AFB2E7

Accessibility & contrast

On white

5.89
#5157CA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.57
#5157CA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5157CA
5.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5157CA#FFFFFF#000000##FFFFFF
##5157CA1.005.893.575.89
#FFFFFF5.891.0021.001.00
#0000003.5721.001.0021.00
##FFFFFF5.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006ACE
Deuteranopia (green-blind)
#005FC8
Tritanopia (blue-blind)
#007288
Achromatopsia (no color)
#646464

Design tokens & code

CSS
--color: #5157ca;
/* rgb */ color: rgb(81, 87, 202);
/* oklch */ color: oklch(51.7% 0.175 276.1);
Tailwind
colors: {
  custom: {
    50: '#8d86db',
    500: '#5157ca',
    950: '#000000',
  },
}
SCSS
$custom: #5157ca;
$custom-light: #8d86db;
$custom-dark: #000000;
JSON
{
  "hex": "#5157ca",
  "rgb": {
    "r": 81,
    "g": 87,
    "b": 202
  },
  "hsl": {
    "h": 237.025,
    "s": 53.304,
    "l": 55.49
  },
  "oklch": {
    "l": 0.5171,
    "c": 0.17535,
    "h": 276.1
  },
  "luminance": 0.1283
}

Semantic roles & 50–950 ramp

primary
#5157CA
secondary
#D5D2A2
accent
#D54BDD
background
#F9F8FD
surface
#F1EFFB
border
#CBCAD4
text
#0D0B15
muted
#7E7C83

Preview Lab

Preview with #5157CA

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

Preview Lab → · Contrast checker → · Palette generator →

#5157CA Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva