#7940CB#7940CB

#7940CB is a mid, highly saturated violet. Relative luminance 0.120; OKLCH L 51.7% C 0.203 H 297.6°. Best body text is #FFFFFF at 6.16:1 contrast (WCAG AA passes).

Color values

HEX#7940CB
RGBrgb(121, 64, 203)
HSLhsl(265, 57%, 52%)
HSVhsv(265, 68%, 80%)
CMYKcmyk(40.4%, 68.5%, 0%, 20.4%)
CIE-LABlab(41.28, 52.91, -63.11)
CIE-LCHlch(41.28, 82.36, 309.98°)
OKLaboklab(51.71% 0.0942 -0.1802)
OKLCHoklch(51.71% 0.203 297.6)
XYZxyz(20.4953, 12.0432, 57.7331)
Luminance0.1204 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7940CB #92CB40
analogous
#404DCB #7940CB #BE40CB
triadic
#7940CB #CB7940 #40CB79
tetradic
#7940CB #CB404D #92CB40 #40CBBE
square
#7940CB #CB404D #92CB40 #40CBBE
split-complementary
#7940CB #CBBE40 #4DCB40
monochromatic
#411F72 #5C2CA2 #7940CB #9B70D8 #BCA0E5

Accessibility & contrast

On white

6.16
#7940CB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.41
#7940CB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7940CB
6.16:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7940CB#FFFFFF#000000##FFFFFF
##7940CB1.006.163.416.16
#FFFFFF6.161.0021.001.00
#0000003.4121.001.0021.00
##FFFFFF6.161.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0062CF
Deuteranopia (green-blind)
#0060C8
Tritanopia (blue-blind)
#656281
Achromatopsia (no color)
#616161

Design tokens & code

CSS
--color: #7940cb;
/* rgb */ color: rgb(121, 64, 203);
/* oklch */ color: oklch(51.7% 0.203 297.6);
Tailwind
colors: {
  custom: {
    50: '#a679dc',
    500: '#7940cb',
    950: '#000000',
  },
}
SCSS
$custom: #7940cb;
$custom-light: #a679dc;
$custom-dark: #000000;
JSON
{
  "hex": "#7940cb",
  "rgb": {
    "r": 121,
    "g": 64,
    "b": 203
  },
  "hsl": {
    "h": 264.604,
    "s": 57.202,
    "l": 52.353
  },
  "oklch": {
    "l": 0.51713,
    "c": 0.20331,
    "h": 297.6
  },
  "luminance": 0.12044
}

Semantic roles & 50–950 ramp

primary
#7940CB
secondary
#B9D295
accent
#E047A2
background
#FAF7FD
surface
#F4EEFB
border
#CEC9D4
text
#100915
muted
#7F7B83

Preview Lab

Preview with #7940CB

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

Preview Lab → · Contrast checker → · Palette generator →

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