#9F40DB#9F40DB

#9F40DB is a mid, highly saturated violet. Relative luminance 0.162; OKLCH L 57.3% C 0.228 H 308.9°. Best body text is #FFFFFF at 4.96:1 contrast (WCAG AA passes).

Color values

HEX#9F40DB
RGBrgb(159, 64, 219)
HSLhsl(277, 68%, 55%)
HSVhsv(277, 71%, 86%)
CMYKcmyk(27.4%, 70.8%, 0%, 14.1%)
CIE-LABlab(47.17, 63.98, -62.53)
CIE-LCHlch(47.17, 89.46, 315.65°)
OKLaboklab(57.3% 0.1429 -0.1772)
OKLCHoklch(57.3% 0.228 308.9)
XYZxyz(28.9151, 16.1527, 68.5986)
Luminance0.1615 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9F40DB #7CDB40
analogous
#5140DB #9F40DB #DB40CA
triadic
#9F40DB #DB9F40 #40DB9F
tetradic
#9F40DB #DB5140 #7CDB40 #40CADB
square
#9F40DB #DB5140 #7CDB40 #40CADB
split-complementary
#9F40DB #CADB40 #40DB51
monochromatic
#5D1987 #8023BB #9F40DB #B973E5 #D3A7EE

Accessibility & contrast

On white

4.96
#9F40DB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.23
#9F40DB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9F40DB
4.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9F40DB#FFFFFF#000000##FFFFFF
##9F40DB1.004.964.234.96
#FFFFFF4.961.0021.001.00
#0000004.2321.001.0021.00
##FFFFFF4.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006CDF
Deuteranopia (green-blind)
#1971D8
Tritanopia (blue-blind)
#96638A
Achromatopsia (no color)
#707070

Design tokens & code

CSS
--color: #9f40db;
/* rgb */ color: rgb(159, 64, 219);
/* oklch */ color: oklch(57.3% 0.228 308.9);
Tailwind
colors: {
  custom: {
    50: '#c07de7',
    500: '#9f40db',
    950: '#000000',
  },
}
SCSS
$custom: #9f40db;
$custom-light: #c07de7;
$custom-dark: #000000;
JSON
{
  "hex": "#9f40db",
  "rgb": {
    "r": 159,
    "g": 64,
    "b": 219
  },
  "hsl": {
    "h": 276.774,
    "s": 68.282,
    "l": 55.49
  },
  "oklch": {
    "l": 0.573,
    "c": 0.22767,
    "h": 308.9
  },
  "luminance": 0.16152
}

Semantic roles & 50–950 ramp

primary
#9F40DB
secondary
#B4DC9B
accent
#EB3D80
background
#FCF7FE
surface
#F8EEFD
border
#D1C9D5
text
#130A16
muted
#827C84

Preview Lab

Preview with #9F40DB

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

Preview Lab → · Contrast checker → · Palette generator →

#9F40DB Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva