#7D40C2#7D40C2

#7D40C2 is a mid, vivid violet. Relative luminance 0.119; OKLCH L 51.5% C 0.194 H 301.4°. Best body text is #FFFFFF at 6.20:1 contrast (WCAG AA passes).

Color values

HEX#7D40C2
RGBrgb(125, 64, 194)
HSLhsl(268, 52%, 51%)
HSVhsv(268, 67%, 76%)
CMYKcmyk(35.6%, 67%, 0%, 23.9%)
CIE-LABlab(41.09, 51.44, -58.17)
CIE-LCHlch(41.09, 77.65, 311.49°)
OKLaboklab(51.47% 0.1009 -0.1655)
OKLCHoklch(51.47% 0.194 301.4)
XYZxyz(20.0261, 11.9217, 52.2745)
Luminance0.1192 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7D40C2 #85C240
analogous
#4044C2 #7D40C2 #BE40C2
triadic
#7D40C2 #C27D40 #40C27D
tetradic
#7D40C2 #C24044 #85C240 #40C2BE
square
#7D40C2 #C24044 #85C240 #40C2BE
split-complementary
#7D40C2 #C2BE40 #44C240
monochromatic
#422167 #5F3095 #7D40C2 #9D6ED1 #BC9DE0

Accessibility & contrast

On white

6.20
#7D40C2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.38
#7D40C2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7D40C2
6.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7D40C2#FFFFFF#000000##FFFFFF
##7D40C21.006.203.386.20
#FFFFFF6.201.0021.001.00
#0000003.3821.001.0021.00
##FFFFFF6.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060C6
Deuteranopia (green-blind)
#0060BF
Tritanopia (blue-blind)
#6E5E7C
Achromatopsia (no color)
#616161

Design tokens & code

CSS
--color: #7d40c2;
/* rgb */ color: rgb(125, 64, 194);
/* oklch */ color: oklch(51.5% 0.194 301.4);
Tailwind
colors: {
  custom: {
    50: '#a879d5',
    500: '#7d40c2',
    950: '#000000',
  },
}
SCSS
$custom: #7d40c2;
$custom-light: #a879d5;
$custom-dark: #000000;
JSON
{
  "hex": "#7d40c2",
  "rgb": {
    "r": 125,
    "g": 64,
    "b": 194
  },
  "hsl": {
    "h": 268.154,
    "s": 51.587,
    "l": 50.588
  },
  "oklch": {
    "l": 0.51471,
    "c": 0.19387,
    "h": 301.4
  },
  "luminance": 0.11922
}

Semantic roles & 50–950 ramp

primary
#7D40C2
secondary
#B1CC92
accent
#DB4D98
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100914
muted
#7F7B83

Preview Lab

Preview with #7D40C2

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

Preview Lab → · Contrast checker → · Palette generator →

#7D40C2 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva