#5A2FA7#5A2FA7

#5A2FA7 is a dark, vivid violet. Relative luminance 0.070; OKLCH L 43.3% C 0.180 H 293.9°. Best body text is #FFFFFF at 8.75:1 contrast (WCAG AA passes).

Color values

HEX#5A2FA7
RGBrgb(90, 47, 167)
HSLhsl(262, 56%, 42%)
HSVhsv(262, 72%, 65%)
CMYKcmyk(46.1%, 71.9%, 0%, 34.5%)
CIE-LABlab(31.80, 46.23, -57.48)
CIE-LCHlch(31.80, 73.76, 308.81°)
OKLaboklab(43.26% 0.073 -0.1646)
OKLCHoklch(43.26% 0.18 293.9)
XYZxyz(12.2061, 6.9964, 37.2590)
Luminance0.0700 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A2FA7 #7CA72F
analogous
#2F40A7 #5A2FA7 #962FA7
triadic
#5A2FA7 #A75A2F #2FA75A
tetradic
#5A2FA7 #A72F40 #7CA72F #2FA796
square
#5A2FA7 #A72F40 #7CA72F #2FA796
split-complementary
#5A2FA7 #A7962F #40A72F
monochromatic
#271447 #402277 #5A2FA7 #7748CB #9A78D9

Accessibility & contrast

On white

8.75
#5A2FA7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.40
#5A2FA7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A2FA7
8.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A2FA7#FFFFFF#000000##FFFFFF
##5A2FA71.008.752.408.75
#FFFFFF8.751.0021.001.00
#0000002.4021.001.0021.00
##FFFFFF8.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CAB
Deuteranopia (green-blind)
#0049A5
Tritanopia (blue-blind)
#444E68
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #5a2fa7;
/* rgb */ color: rgb(90, 47, 167);
/* oklch */ color: oklch(43.3% 0.180 293.9);
Tailwind
colors: {
  custom: {
    50: '#906bc2',
    500: '#5a2fa7',
    950: '#000000',
  },
}
SCSS
$custom: #5a2fa7;
$custom-light: #906bc2;
$custom-dark: #000000;
JSON
{
  "hex": "#5a2fa7",
  "rgb": {
    "r": 90,
    "g": 47,
    "b": 167
  },
  "hsl": {
    "h": 261.5,
    "s": 56.075,
    "l": 41.961
  },
  "oklch": {
    "l": 0.43255,
    "c": 0.18007,
    "h": 293.9
  },
  "luminance": 0.06997
}

Semantic roles & 50–950 ramp

primary
#5A2FA7
secondary
#A4C171
accent
#DF48A9
background
#F9F6FC
surface
#F2EBF8
border
#CCC6D1
text
#0D0712
muted
#7E7A81

Preview Lab

Preview with #5A2FA7

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

Preview Lab → · Contrast checker → · Palette generator →

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