#5F2FA8#5F2FA8

#5F2FA8 is a dark, vivid violet. Relative luminance 0.073; OKLCH L 43.9% C 0.182 H 296.2°. Best body text is #FFFFFF at 8.54:1 contrast (WCAG AA passes).

Color values

HEX#5F2FA8
RGBrgb(95, 47, 168)
HSLhsl(264, 56%, 42%)
HSVhsv(264, 72%, 66%)
CMYKcmyk(43.5%, 72%, 0%, 34.1%)
CIE-LABlab(32.46, 47.40, -56.97)
CIE-LCHlch(32.46, 74.11, 309.76°)
OKLaboklab(43.89% 0.0801 -0.163)
OKLCHoklch(43.89% 0.182 296.2)
XYZxyz(12.8018, 7.2928, 37.7714)
Luminance0.0729 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F2FA8 #78A82F
analogous
#2F3BA8 #5F2FA8 #9C2FA8
triadic
#5F2FA8 #A85F2F #2FA85F
tetradic
#5F2FA8 #A82F3B #78A82F #2FA89C
square
#5F2FA8 #A82F3B #78A82F #2FA89C
split-complementary
#5F2FA8 #A89C2F #3BA82F
monochromatic
#291448 #442278 #5F2FA8 #7D48CC #9F78D9

Accessibility & contrast

On white

8.54
#5F2FA8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.46
#5F2FA8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F2FA8
8.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F2FA8#FFFFFF#000000##FFFFFF
##5F2FA81.008.542.468.54
#FFFFFF8.541.0021.001.00
#0000002.4621.001.0021.00
##FFFFFF8.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004DAC
Deuteranopia (green-blind)
#004BA6
Tritanopia (blue-blind)
#4C4E68
Achromatopsia (no color)
#4C4C4C

Design tokens & code

CSS
--color: #5f2fa8;
/* rgb */ color: rgb(95, 47, 168);
/* oklch */ color: oklch(43.9% 0.182 296.2);
Tailwind
colors: {
  custom: {
    50: '#936cc3',
    500: '#5f2fa8',
    950: '#000000',
  },
}
SCSS
$custom: #5f2fa8;
$custom-light: #936cc3;
$custom-dark: #000000;
JSON
{
  "hex": "#5f2fa8",
  "rgb": {
    "r": 95,
    "g": 47,
    "b": 168
  },
  "hsl": {
    "h": 263.802,
    "s": 56.279,
    "l": 42.157
  },
  "oklch": {
    "l": 0.43886,
    "c": 0.18159,
    "h": 296.2
  },
  "luminance": 0.07293
}

Semantic roles & 50–950 ramp

primary
#5F2FA8
secondary
#A2C171
accent
#E048A4
background
#F9F6FC
surface
#F2ECF8
border
#CCC7D1
text
#0E0713
muted
#7E7A82

Preview Lab

Preview with #5F2FA8

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

Preview Lab → · Contrast checker → · Palette generator →

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