#7E40C8#7E40C8

#7E40C8 is a mid, highly saturated violet. Relative luminance 0.123; OKLCH L 52.0% C 0.201 H 300.4°. Best body text is #FFFFFF at 6.08:1 contrast (WCAG AA passes).

Color values

HEX#7E40C8
RGBrgb(126, 64, 200)
HSLhsl(267, 55%, 52%)
HSVhsv(267, 68%, 78%)
CMYKcmyk(37%, 68%, 0%, 21.6%)
CIE-LABlab(41.65, 53.13, -60.76)
CIE-LCHlch(41.65, 80.71, 311.17°)
OKLaboklab(52.03% 0.1015 -0.1731)
OKLCHoklch(52.03% 0.201 300.4)
XYZxyz(20.8604, 12.2724, 55.9022)
Luminance0.1227 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E40C8 #8AC840
analogous
#4046C8 #7E40C8 #C240C8
triadic
#7E40C8 #C87E40 #40C87E
tetradic
#7E40C8 #C84046 #8AC840 #40C8C2
square
#7E40C8 #C84046 #8AC840 #40C8C2
split-complementary
#7E40C8 #C8C240 #46C840
monochromatic
#43206E #602D9D #7E40C8 #9E70D6 #BE9FE3

Accessibility & contrast

On white

6.08
#7E40C8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.45
#7E40C8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7E40C8
6.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E40C8#FFFFFF#000000##FFFFFF
##7E40C81.006.083.456.08
#FFFFFF6.081.0021.001.00
#0000003.4521.001.0021.00
##FFFFFF6.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0062CC
Deuteranopia (green-blind)
#0061C5
Tritanopia (blue-blind)
#6E607F
Achromatopsia (no color)
#626262

Design tokens & code

CSS
--color: #7e40c8;
/* rgb */ color: rgb(126, 64, 200);
/* oklch */ color: oklch(52.0% 0.201 300.4);
Tailwind
colors: {
  custom: {
    50: '#a979da',
    500: '#7e40c8',
    950: '#000000',
  },
}
SCSS
$custom: #7e40c8;
$custom-light: #a979da;
$custom-dark: #000000;
JSON
{
  "hex": "#7e40c8",
  "rgb": {
    "r": 126,
    "g": 64,
    "b": 200
  },
  "hsl": {
    "h": 267.353,
    "s": 55.285,
    "l": 51.765
  },
  "oklch": {
    "l": 0.52032,
    "c": 0.20067,
    "h": 300.4
  },
  "luminance": 0.12273
}

Semantic roles & 50–950 ramp

primary
#7E40C8
secondary
#B5D094
accent
#DF499A
background
#FAF7FD
surface
#F4EEFB
border
#CEC9D4
text
#100915
muted
#7F7B83

Preview Lab

Preview with #7E40C8

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

Preview Lab → · Contrast checker → · Palette generator →

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