#7B40C6#7B40C6

#7B40C6 is a mid, vivid violet. Relative luminance 0.120; OKLCH L 51.5% C 0.198 H 299.6°. Best body text is #FFFFFF at 6.19:1 contrast (WCAG AA passes).

Color values

HEX#7B40C6
RGBrgb(123, 64, 198)
HSLhsl(266, 54%, 51%)
HSVhsv(266, 68%, 78%)
CMYKcmyk(37.9%, 67.7%, 0%, 22.4%)
CIE-LABlab(41.14, 52.03, -60.43)
CIE-LCHlch(41.14, 79.74, 310.73°)
OKLaboklab(51.55% 0.0977 -0.1722)
OKLCHoklch(51.55% 0.198 299.6)
XYZxyz(20.1923, 11.9547, 54.6588)
Luminance0.1196 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7B40C6 #8BC640
analogous
#4048C6 #7B40C6 #BE40C6
triadic
#7B40C6 #C67B40 #40C67B
tetradic
#7B40C6 #C64048 #8BC640 #40C6BE
square
#7B40C6 #C64048 #8BC640 #40C6BE
split-complementary
#7B40C6 #C6BE40 #48C640
monochromatic
#41206C #5E2E9B #7B40C6 #9C6FD4 #BC9EE2

Accessibility & contrast

On white

6.19
#7B40C6 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.39
#7B40C6 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7B40C6
6.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7B40C6#FFFFFF#000000##FFFFFF
##7B40C61.006.193.396.19
#FFFFFF6.191.0021.001.00
#0000003.3921.001.0021.00
##FFFFFF6.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0061CA
Deuteranopia (green-blind)
#0060C3
Tritanopia (blue-blind)
#6A5F7E
Achromatopsia (no color)
#616161

Design tokens & code

CSS
--color: #7b40c6;
/* rgb */ color: rgb(123, 64, 198);
/* oklch */ color: oklch(51.5% 0.198 299.6);
Tailwind
colors: {
  custom: {
    50: '#a779d8',
    500: '#7b40c6',
    950: '#000000',
  },
}
SCSS
$custom: #7b40c6;
$custom-light: #a779d8;
$custom-dark: #000000;
JSON
{
  "hex": "#7b40c6",
  "rgb": {
    "r": 123,
    "g": 64,
    "b": 198
  },
  "hsl": {
    "h": 266.418,
    "s": 54.032,
    "l": 51.373
  },
  "oklch": {
    "l": 0.51547,
    "c": 0.19799,
    "h": 299.6
  },
  "luminance": 0.11955
}

Semantic roles & 50–950 ramp

primary
#7B40C6
secondary
#B4CE93
accent
#DD4A9D
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100915
muted
#7F7B83

Preview Lab

Preview with #7B40C6

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

Preview Lab → · Contrast checker → · Palette generator →

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