#5F278B#5F278B

#5F278B is a dark, vivid violet. Relative luminance 0.057; OKLCH L 40.5% C 0.159 H 306.1°. Best body text is #FFFFFF at 9.77:1 contrast (WCAG AA passes).

Color values

HEX#5F278B
RGBrgb(95, 39, 139)
HSLhsl(274, 56%, 35%)
HSVhsv(274, 72%, 55%)
CMYKcmyk(31.7%, 71.9%, 0%, 45.5%)
CIE-LABlab(28.77, 43.89, -45.28)
CIE-LCHlch(28.77, 63.06, 314.11°)
OKLaboklab(40.54% 0.0936 -0.1286)
OKLCHoklch(40.54% 0.159 306.1)
XYZxyz(10.1040, 5.7481, 24.9983)
Luminance0.0575 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F278B #538B27
analogous
#2D278B #5F278B #8B2785
triadic
#5F278B #8B5F27 #278B5F
tetradic
#5F278B #8B2D27 #538B27 #27858B
square
#5F278B #8B2D27 #538B27 #27858B
split-complementary
#5F278B #858B27 #278B2D
monochromatic
#1E0C2B #3E1A5B #5F278B #8034BB #9D5BD1

Accessibility & contrast

On white

9.77
#5F278B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.15
#5F278B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F278B
9.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F278B#FFFFFF#000000##FFFFFF
##5F278B1.009.772.159.77
#FFFFFF9.771.0021.001.00
#0000002.1521.001.0021.00
##FFFFFF9.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00428E
Deuteranopia (green-blind)
#024489
Tritanopia (blue-blind)
#573E56
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #5f278b;
/* rgb */ color: rgb(95, 39, 139);
/* oklch */ color: oklch(40.5% 0.159 306.1);
Tailwind
colors: {
  custom: {
    50: '#9166ae',
    500: '#5f278b',
    950: '#000000',
  },
}
SCSS
$custom: #5f278b;
$custom-light: #9166ae;
$custom-dark: #000000;
JSON
{
  "hex": "#5f278b",
  "rgb": {
    "r": 95,
    "g": 39,
    "b": 139
  },
  "hsl": {
    "h": 273.6,
    "s": 56.18,
    "l": 34.902
  },
  "oklch": {
    "l": 0.40537,
    "c": 0.15905,
    "h": 306.1
  },
  "luminance": 0.05748
}

Semantic roles & 50–950 ramp

primary
#5F278B
secondary
#81B658
accent
#DF488B
background
#F9F6FA
surface
#F1EBF4
border
#CBC6CE
text
#0D0610
muted
#7E7A7F

Preview Lab

Preview with #5F278B

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

Preview Lab → · Contrast checker → · Palette generator →

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