#BA87FE#BA87FE

#BA87FE is a light, vivid violet. Relative luminance 0.349; OKLCH L 72.2% C 0.173 H 302.0°. Best body text is #000000 at 7.98:1 contrast (WCAG AA passes).

Color values

HEX#BA87FE
RGBrgb(186, 135, 254)
HSLhsl(266, 98%, 76%)
HSVhsv(266, 47%, 100%)
CMYKcmyk(26.8%, 46.9%, 0%, 0.4%)
CIE-LABlab(65.69, 42.72, -52.27)
CIE-LCHlch(65.69, 67.51, 309.26°)
OKLaboklab(72.17% 0.0918 -0.1466)
OKLCHoklch(72.17% 0.173 302)
XYZxyz(46.7991, 34.9227, 98.0220)
Luminance0.3492 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA87FE #CBFE87
analogous
#8790FE #BA87FE #F587FE
triadic
#BA87FE #FEBA87 #87FEBA
tetradic
#BA87FE #FE8790 #CBFE87 #87FEF5
square
#BA87FE #FE8790 #CBFE87 #87FEF5
split-complementary
#BA87FE #FEF587 #90FE87
monochromatic
#740EFD #974AFD #BA87FE #DDC4FF #EEE1FF

Accessibility & contrast

On white

2.63
#BA87FE on #FFFFFF
AA ✗AA large ✗AAA ✗

On black

7.98
#BA87FE on #000000
AA ✓AA large ✓AAA ✓

Best text color

#000000 on #BA87FE
7.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA87FE#FFFFFF#000000##000000
##BA87FE1.002.637.987.98
#FFFFFF2.631.0021.0021.00
#0000007.9821.001.001.00
##0000007.9821.001.001.00

Color blindness preview

Protanopia (red-blind)
#649FFF
Deuteranopia (green-blind)
#709FFB
Tritanopia (blue-blind)
#AE9CB7
Achromatopsia (no color)
#A0A0A0

Design tokens & code

CSS
--color: #ba87fe;
/* rgb */ color: rgb(186, 135, 254);
/* oklch */ color: oklch(72.2% 0.173 302.0);
Tailwind
colors: {
  custom: {
    50: '#d1abff',
    500: '#ba87fe',
    950: '#000000',
  },
}
SCSS
$custom: #ba87fe;
$custom-light: #d1abff;
$custom-dark: #000000;
JSON
{
  "hex": "#ba87fe",
  "rgb": {
    "r": 186,
    "g": 135,
    "b": 254
  },
  "hsl": {
    "h": 265.714,
    "s": 98.347,
    "l": 76.275
  },
  "oklch": {
    "l": 0.72171,
    "c": 0.17297,
    "h": 302
  },
  "luminance": 0.34923
}

Semantic roles & 50–950 ramp

primary
#BA87FE
secondary
#E8F7D4
accent
#E60083
background
#FDFAFF
surface
#FAF4FF
border
#D3CED7
text
#141018
muted
#837F86

Preview Lab

Preview with #BA87FE

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

Preview Lab → · Contrast checker → · Palette generator →

#BA87FE Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva