#7940C2#7940C2

#7940C2 is a mid, vivid violet. Relative luminance 0.116; OKLCH L 51.0% C 0.193 H 299.6°. Best body text is #FFFFFF at 6.32:1 contrast (WCAG AA passes).

Color values

HEX#7940C2
RGBrgb(121, 64, 194)
HSLhsl(266, 52%, 51%)
HSVhsv(266, 67%, 76%)
CMYKcmyk(37.6%, 67%, 0%, 23.9%)
CIE-LABlab(40.62, 50.63, -58.96)
CIE-LCHlch(40.62, 77.72, 310.65°)
OKLaboklab(51.02% 0.0954 -0.168)
OKLCHoklch(51.02% 0.193 299.6)
XYZxyz(19.4537, 11.6266, 52.2477)
Luminance0.1163 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7940C2 #89C240
analogous
#4048C2 #7940C2 #BA40C2
triadic
#7940C2 #C27940 #40C279
tetradic
#7940C2 #C24048 #89C240 #40C2BA
square
#7940C2 #C24048 #89C240 #40C2BA
split-complementary
#7940C2 #C2BA40 #48C240
monochromatic
#3F2167 #5C3095 #7940C2 #9A6ED1 #BA9DE0

Accessibility & contrast

On white

6.32
#7940C2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.33
#7940C2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7940C2
6.32:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7940C2#FFFFFF#000000##FFFFFF
##7940C21.006.323.336.32
#FFFFFF6.321.0021.001.00
#0000003.3321.001.0021.00
##FFFFFF6.321.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060C6
Deuteranopia (green-blind)
#005FBF
Tritanopia (blue-blind)
#685E7C
Achromatopsia (no color)
#606060

Design tokens & code

CSS
--color: #7940c2;
/* rgb */ color: rgb(121, 64, 194);
/* oklch */ color: oklch(51.0% 0.193 299.6);
Tailwind
colors: {
  custom: {
    50: '#a579d5',
    500: '#7940c2',
    950: '#000000',
  },
}
SCSS
$custom: #7940c2;
$custom-light: #a579d5;
$custom-dark: #000000;
JSON
{
  "hex": "#7940c2",
  "rgb": {
    "r": 121,
    "g": 64,
    "b": 194
  },
  "hsl": {
    "h": 266.308,
    "s": 51.587,
    "l": 50.588
  },
  "oklch": {
    "l": 0.51024,
    "c": 0.19321,
    "h": 299.6
  },
  "luminance": 0.11627
}

Semantic roles & 50–950 ramp

primary
#7940C2
secondary
#B2CC92
accent
#DB4D9D
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100914
muted
#7F7B83

Preview Lab

Preview with #7940C2

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

Preview Lab → · Contrast checker → · Palette generator →

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