#7B40C5#7B40C5

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

Color values

HEX#7B40C5
RGBrgb(123, 64, 197)
HSLhsl(267, 53%, 51%)
HSVhsv(267, 68%, 77%)
CMYKcmyk(37.6%, 67.5%, 0%, 22.7%)
CIE-LABlab(41.07, 51.78, -59.96)
CIE-LCHlch(41.07, 79.23, 310.81°)
OKLaboklab(51.47% 0.0978 -0.1709)
OKLCHoklch(51.47% 0.197 299.8)
XYZxyz(20.0773, 11.9088, 54.0534)
Luminance0.1191 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7B40C5 #8AC540
analogous
#4047C5 #7B40C5 #BE40C5
triadic
#7B40C5 #C57B40 #40C57B
tetradic
#7B40C5 #C54047 #8AC540 #40C5BE
square
#7B40C5 #C54047 #8AC540 #40C5BE
split-complementary
#7B40C5 #C5BE40 #47C540
monochromatic
#41206A #5E2F99 #7B40C5 #9B6FD3 #BC9EE2

Accessibility & contrast

On white

6.21
#7B40C5 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

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

Best text color

#FFFFFF on #7B40C5
6.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7B40C5#FFFFFF#000000##FFFFFF
##7B40C51.006.213.386.21
#FFFFFF6.211.0021.001.00
#0000003.3821.001.0021.00
##FFFFFF6.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0061C9
Deuteranopia (green-blind)
#0060C2
Tritanopia (blue-blind)
#6A5F7D
Achromatopsia (no color)
#616161

Design tokens & code

CSS
--color: #7b40c5;
/* rgb */ color: rgb(123, 64, 197);
/* oklch */ color: oklch(51.5% 0.197 299.8);
Tailwind
colors: {
  custom: {
    50: '#a779d7',
    500: '#7b40c5',
    950: '#000000',
  },
}
SCSS
$custom: #7b40c5;
$custom-light: #a779d7;
$custom-dark: #000000;
JSON
{
  "hex": "#7b40c5",
  "rgb": {
    "r": 123,
    "g": 64,
    "b": 197
  },
  "hsl": {
    "h": 266.617,
    "s": 53.414,
    "l": 51.176
  },
  "oklch": {
    "l": 0.51472,
    "c": 0.19687,
    "h": 299.8
  },
  "luminance": 0.11909
}

Semantic roles & 50–950 ramp

primary
#7B40C5
secondary
#B4CE93
accent
#DD4B9C
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100914
muted
#7F7B83

Preview Lab

Preview with #7B40C5

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

Preview Lab → · Contrast checker → · Palette generator →

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