#9838CB#9838CB

#9838CB is a mid, highly saturated violet. Relative luminance 0.138; OKLCH L 54.5% C 0.220 H 311.0°. Best body text is #FFFFFF at 5.58:1 contrast (WCAG AA passes).

Color values

HEX#9838CB
RGBrgb(152, 56, 203)
HSLhsl(279, 59%, 51%)
HSVhsv(279, 72%, 80%)
CMYKcmyk(25.1%, 72.4%, 0%, 20.4%)
CIE-LABlab(43.97, 62.47, -58.57)
CIE-LCHlch(43.97, 85.64, 316.85°)
OKLaboklab(54.48% 0.144 -0.1658)
OKLCHoklch(54.48% 0.22 311)
XYZxyz(25.1405, 13.8162, 57.8308)
Luminance0.1382 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9838CB #6BCB38
analogous
#4E38CB #9838CB #CB38B4
triadic
#9838CB #CB9838 #38CB98
tetradic
#9838CB #CB4E38 #6BCB38 #38B4CB
square
#9838CB #CB4E38 #6BCB38 #38B4CB
split-complementary
#9838CB #B4CB38 #38CB4E
monochromatic
#511C6C #75299D #9838CB #B169D8 #CA99E4

Accessibility & contrast

On white

5.58
#9838CB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.76
#9838CB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9838CB
5.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9838CB#FFFFFF#000000##FFFFFF
##9838CB1.005.583.765.58
#FFFFFF5.581.0021.001.00
#0000003.7621.001.0021.00
##FFFFFF5.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0064CF
Deuteranopia (green-blind)
#1E6AC8
Tritanopia (blue-blind)
#91597E
Achromatopsia (no color)
#686868

Design tokens & code

CSS
--color: #9838cb;
/* rgb */ color: rgb(152, 56, 203);
/* oklch */ color: oklch(54.5% 0.220 311.0);
Tailwind
colors: {
  custom: {
    50: '#bb77dc',
    500: '#9838cb',
    950: '#000000',
  },
}
SCSS
$custom: #9838cb;
$custom-light: #bb77dc;
$custom-dark: #000000;
JSON
{
  "hex": "#9838cb",
  "rgb": {
    "r": 152,
    "g": 56,
    "b": 203
  },
  "hsl": {
    "h": 279.184,
    "s": 58.566,
    "l": 50.784
  },
  "oklch": {
    "l": 0.54476,
    "c": 0.21955,
    "h": 311
  },
  "luminance": 0.13816
}

Semantic roles & 50–950 ramp

primary
#9838CB
secondary
#A5D08F
accent
#E2467C
background
#FCF7FD
surface
#F8EEFB
border
#D1C9D4
text
#120915
muted
#817B83

Preview Lab

Preview with #9838CB

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

Preview Lab → · Contrast checker → · Palette generator →

#9838CB Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva