#7940C4#7940C4

#7940C4 is a mid, vivid violet. Relative luminance 0.117; OKLCH L 51.2% C 0.195 H 299.1°. Best body text is #FFFFFF at 6.28:1 contrast (WCAG AA passes).

Color values

HEX#7940C4
RGBrgb(121, 64, 196)
HSLhsl(266, 53%, 51%)
HSVhsv(266, 67%, 77%)
CMYKcmyk(38.3%, 67.3%, 0%, 23.1%)
CIE-LABlab(40.76, 51.13, -59.89)
CIE-LCHlch(40.76, 78.75, 310.49°)
OKLaboklab(51.18% 0.0952 -0.1707)
OKLCHoklch(51.18% 0.195 299.1)
XYZxyz(19.6799, 11.7170, 53.4386)
Luminance0.1172 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7940C4 #8BC440
analogous
#4049C4 #7940C4 #BB40C4
triadic
#7940C4 #C47940 #40C479
tetradic
#7940C4 #C44049 #8BC440 #40C4BB
square
#7940C4 #C44049 #8BC440 #40C4BB
split-complementary
#7940C4 #C4BB40 #49C440
monochromatic
#402069 #5C2F98 #7940C4 #9A6FD2 #BB9EE1

Accessibility & contrast

On white

6.28
#7940C4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.34
#7940C4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7940C4
6.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7940C4#FFFFFF#000000##FFFFFF
##7940C41.006.283.346.28
#FFFFFF6.281.0021.001.00
#0000003.3421.001.0021.00
##FFFFFF6.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060C8
Deuteranopia (green-blind)
#005FC1
Tritanopia (blue-blind)
#685F7D
Achromatopsia (no color)
#606060

Design tokens & code

CSS
--color: #7940c4;
/* rgb */ color: rgb(121, 64, 196);
/* oklch */ color: oklch(51.2% 0.195 299.1);
Tailwind
colors: {
  custom: {
    50: '#a579d7',
    500: '#7940c4',
    950: '#000000',
  },
}
SCSS
$custom: #7940c4;
$custom-light: #a579d7;
$custom-dark: #000000;
JSON
{
  "hex": "#7940c4",
  "rgb": {
    "r": 121,
    "g": 64,
    "b": 196
  },
  "hsl": {
    "h": 265.909,
    "s": 52.8,
    "l": 50.98
  },
  "oklch": {
    "l": 0.51176,
    "c": 0.19546,
    "h": 299.1
  },
  "luminance": 0.11717
}

Semantic roles & 50–950 ramp

primary
#7940C4
secondary
#B4CD93
accent
#DC4C9E
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100914
muted
#7F7B83

Preview Lab

Preview with #7940C4

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

Preview Lab → · Contrast checker → · Palette generator →

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