#7B40C4#7B40C4

#7B40C4 is a mid, vivid violet. Relative luminance 0.119; OKLCH L 51.4% C 0.196 H 300.0°. Best body text is #FFFFFF at 6.23:1 contrast (WCAG AA passes).

Color values

HEX#7B40C4
RGBrgb(123, 64, 196)
HSLhsl(267, 53%, 51%)
HSVhsv(267, 67%, 77%)
CMYKcmyk(37.2%, 67.3%, 0%, 23.1%)
CIE-LABlab(41.00, 51.53, -59.50)
CIE-LCHlch(41.00, 78.71, 310.90°)
OKLaboklab(51.4% 0.0979 -0.1695)
OKLCHoklch(51.4% 0.196 300)
XYZxyz(19.9631, 11.8631, 53.4519)
Luminance0.1186 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7B40C4 #89C440
analogous
#4047C4 #7B40C4 #BD40C4
triadic
#7B40C4 #C47B40 #40C47B
tetradic
#7B40C4 #C44047 #89C440 #40C4BD
square
#7B40C4 #C44047 #89C440 #40C4BD
split-complementary
#7B40C4 #C4BD40 #47C440
monochromatic
#412069 #5E2F98 #7B40C4 #9B6FD2 #BC9EE1

Accessibility & contrast

On white

6.23
#7B40C4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.37
#7B40C4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7B40C4
6.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7B40C4#FFFFFF#000000##FFFFFF
##7B40C41.006.233.376.23
#FFFFFF6.231.0021.001.00
#0000003.3721.001.0021.00
##FFFFFF6.231.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060C8
Deuteranopia (green-blind)
#0060C1
Tritanopia (blue-blind)
#6B5F7D
Achromatopsia (no color)
#616161

Design tokens & code

CSS
--color: #7b40c4;
/* rgb */ color: rgb(123, 64, 196);
/* oklch */ color: oklch(51.4% 0.196 300.0);
Tailwind
colors: {
  custom: {
    50: '#a779d7',
    500: '#7b40c4',
    950: '#000000',
  },
}
SCSS
$custom: #7b40c4;
$custom-light: #a779d7;
$custom-dark: #000000;
JSON
{
  "hex": "#7b40c4",
  "rgb": {
    "r": 123,
    "g": 64,
    "b": 196
  },
  "hsl": {
    "h": 266.818,
    "s": 52.8,
    "l": 50.98
  },
  "oklch": {
    "l": 0.51396,
    "c": 0.19576,
    "h": 300
  },
  "luminance": 0.11863
}

Semantic roles & 50–950 ramp

primary
#7B40C4
secondary
#B3CD93
accent
#DC4C9C
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100914
muted
#7F7B83

Preview Lab

Preview with #7B40C4

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

Preview Lab → · Contrast checker → · Palette generator →

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