#7C40B2#7C40B2

#7C40B2 is a mid, vivid violet. Relative luminance 0.112; OKLCH L 50.2% C 0.176 H 305.1°. Best body text is #FFFFFF at 6.50:1 contrast (WCAG AA passes).

Color values

HEX#7C40B2
RGBrgb(124, 64, 178)
HSLhsl(272, 47%, 47%)
HSVhsv(272, 64%, 70%)
CMYKcmyk(30.3%, 64%, 0%, 30.2%)
CIE-LABlab(39.86, 47.31, -50.78)
CIE-LCHlch(39.86, 69.40, 312.98°)
OKLaboklab(50.21% 0.1011 -0.1438)
OKLCHoklch(50.21% 0.176 305.1)
XYZxyz(18.1797, 11.1663, 43.3084)
Luminance0.1117 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7C40B2 #76B240
analogous
#4340B2 #7C40B2 #B240AF
triadic
#7C40B2 #B27C40 #40B27C
tetradic
#7C40B2 #B24340 #76B240 #40AFB2
square
#7C40B2 #B24340 #76B240 #40AFB2
split-complementary
#7C40B2 #AFB240 #40B243
monochromatic
#3D2058 #5D3085 #7C40B2 #9A67C8 #B894D8

Accessibility & contrast

On white

6.50
#7C40B2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.23
#7C40B2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7C40B2
6.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7C40B2#FFFFFF#000000##FFFFFF
##7C40B21.006.503.236.50
#FFFFFF6.501.0021.001.00
#0000003.2321.001.0021.00
##FFFFFF6.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005CB6
Deuteranopia (green-blind)
#235EAF
Tritanopia (blue-blind)
#725873
Achromatopsia (no color)
#5E5E5E

Design tokens & code

CSS
--color: #7c40b2;
/* rgb */ color: rgb(124, 64, 178);
/* oklch */ color: oklch(50.2% 0.176 305.1);
Tailwind
colors: {
  custom: {
    50: '#a678ca',
    500: '#7c40b2',
    950: '#000000',
  },
}
SCSS
$custom: #7c40b2;
$custom-light: #a678ca;
$custom-dark: #000000;
JSON
{
  "hex": "#7c40b2",
  "rgb": {
    "r": 124,
    "g": 64,
    "b": 178
  },
  "hsl": {
    "h": 271.579,
    "s": 47.107,
    "l": 47.451
  },
  "oklch": {
    "l": 0.50205,
    "c": 0.17579,
    "h": 305.1
  },
  "luminance": 0.11166
}

Semantic roles & 50–950 ramp

primary
#7C40B2
secondary
#A5C48A
accent
#D75190
background
#FAF7FC
surface
#F4EDF8
border
#CEC8D1
text
#100913
muted
#7F7B82

Preview Lab

Preview with #7C40B2

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

Preview Lab → · Contrast checker → · Palette generator →

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