#5127B2#5127B2

#5127B2 is a dark, highly saturated violet. Relative luminance 0.064; OKLCH L 42.4% C 0.201 H 288.3°. Best body text is #FFFFFF at 9.20:1 contrast (WCAG AA passes).

Color values

HEX#5127B2
RGBrgb(81, 39, 178)
HSLhsl(258, 64%, 43%)
HSVhsv(258, 78%, 70%)
CMYKcmyk(54.5%, 78.1%, 0%, 30.2%)
CIE-LABlab(30.43, 51.74, -66.34)
CIE-LCHlch(30.43, 84.14, 307.95°)
OKLaboklab(42.37% 0.0633 -0.1909)
OKLCHoklch(42.37% 0.201 288.3)
XYZxyz(12.1524, 6.4141, 42.7086)
Luminance0.0641 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5127B2 #88B227
analogous
#2743B2 #5127B2 #9627B2
triadic
#5127B2 #B25127 #27B251
tetradic
#5127B2 #B22743 #88B227 #27B296
square
#5127B2 #B22743 #88B227 #27B296
split-complementary
#5127B2 #B29627 #43B227
monochromatic
#23114E #3A1C80 #5127B2 #6E41D5 #9473E0

Accessibility & contrast

On white

9.20
#5127B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.28
#5127B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5127B2
9.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5127B2#FFFFFF#000000##FFFFFF
##5127B21.009.202.289.20
#FFFFFF9.201.0021.001.00
#0000002.2821.001.0021.00
##FFFFFF9.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BB6
Deuteranopia (green-blind)
#0044AF
Tritanopia (blue-blind)
#294F6C
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #5127b2;
/* rgb */ color: rgb(81, 39, 178);
/* oklch */ color: oklch(42.4% 0.201 288.3);
Tailwind
colors: {
  custom: {
    50: '#8d67ca',
    500: '#5127b2',
    950: '#000000',
  },
}
SCSS
$custom: #5127b2;
$custom-light: #8d67ca;
$custom-dark: #000000;
JSON
{
  "hex": "#5127b2",
  "rgb": {
    "r": 81,
    "g": 39,
    "b": 178
  },
  "hsl": {
    "h": 258.129,
    "s": 64.055,
    "l": 42.549
  },
  "oklch": {
    "l": 0.42368,
    "c": 0.20109,
    "h": 288.3
  },
  "luminance": 0.06415
}

Semantic roles & 50–950 ramp

primary
#5127B2
secondary
#ACC86D
accent
#E741B5
background
#F9F6FC
surface
#F2EBF9
border
#CCC6D2
text
#0D0613
muted
#7E7A82

Preview Lab

Preview with #5127B2

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

Preview Lab → · Contrast checker → · Palette generator →

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