#5A126E#5A126E

#5A126E is a dark, vivid purple. Relative luminance 0.037; OKLCH L 35.4% C 0.153 H 317.4°. Best body text is #FFFFFF at 12.02:1 contrast (WCAG AA passes).

Color values

HEX#5A126E
RGBrgb(90, 18, 110)
HSLhsl(287, 72%, 25%)
HSVhsv(287, 84%, 43%)
CMYKcmyk(18.2%, 83.6%, 0%, 56.9%)
CIE-LABlab(22.77, 44.92, -36.66)
CIE-LCHlch(22.77, 57.98, 320.79°)
OKLaboklab(35.43% 0.1124 -0.1033)
OKLCHoklch(35.43% 0.153 317.4)
XYZxyz(7.2468, 3.7324, 15.0875)
Luminance0.0373 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A126E #266E12
analogous
#2C126E #5A126E #6E1254
triadic
#5A126E #6E5A12 #126E5A
tetradic
#5A126E #6E2C12 #266E12 #12546E
square
#5A126E #6E2C12 #266E12 #12546E
split-complementary
#5A126E #546E12 #126E2C
monochromatic
#16041A #2F0939 #5A126E #851BA3 #B023D7

Accessibility & contrast

On white

12.02
#5A126E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#5A126E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A126E
12.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A126E#FFFFFF#000000##FFFFFF
##5A126E1.0012.021.7512.02
#FFFFFF12.021.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF12.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003270
Deuteranopia (green-blind)
#14386C
Tritanopia (blue-blind)
#592740
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #5a126e;
/* rgb */ color: rgb(90, 18, 110);
/* oklch */ color: oklch(35.4% 0.153 317.4);
Tailwind
colors: {
  custom: {
    50: '#8c5a98',
    500: '#5a126e',
    950: '#000000',
  },
}
SCSS
$custom: #5a126e;
$custom-light: #8c5a98;
$custom-dark: #000000;
JSON
{
  "hex": "#5a126e",
  "rgb": {
    "r": 90,
    "g": 18,
    "b": 110
  },
  "hsl": {
    "h": 286.957,
    "s": 71.875,
    "l": 25.098
  },
  "oklch": {
    "l": 0.35433,
    "c": 0.15265,
    "h": 317.4
  },
  "luminance": 0.03732
}

Semantic roles & 50–950 ramp

primary
#5A126E
secondary
#4FA537
accent
#EF3961
background
#F8F5F9
surface
#F0E9F2
border
#CBC5CC
text
#0C040E
muted
#7D797E

Preview Lab

Preview with #5A126E

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

Preview Lab → · Contrast checker → · Palette generator →

#5A126E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva