#7B40D4#7B40D4

#7B40D4 is a mid, highly saturated violet. Relative luminance 0.126; OKLCH L 52.6% C 0.213 H 296.6°. Best body text is #FFFFFF at 5.96:1 contrast (WCAG AA passes).

Color values

HEX#7B40D4
RGBrgb(123, 64, 212)
HSLhsl(264, 63%, 54%)
HSVhsv(264, 70%, 83%)
CMYKcmyk(42%, 69.8%, 0%, 16.9%)
CIE-LABlab(42.20, 55.58, -66.80)
CIE-LCHlch(42.20, 86.90, 309.76°)
OKLaboklab(52.63% 0.0954 -0.191)
OKLCHoklch(52.63% 0.214 296.6)
XYZxyz(21.8823, 12.6308, 63.5597)
Luminance0.1263 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7B40D4 #99D440
analogous
#404FD4 #7B40D4 #C540D4
triadic
#7B40D4 #D47B40 #40D47B
tetradic
#7B40D4 #D4404F #99D440 #40D4C5
square
#7B40D4 #D4404F #99D440 #40D4C5
split-complementary
#7B40D4 #D4C540 #4FD440
monochromatic
#431C7D #5E27AF #7B40D4 #9E72DF #C0A4EA

Accessibility & contrast

On white

5.96
#7B40D4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.53
#7B40D4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7B40D4
5.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7B40D4#FFFFFF#000000##FFFFFF
##7B40D41.005.963.535.96
#FFFFFF5.961.0021.001.00
#0000003.5321.001.0021.00
##FFFFFF5.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0064D8
Deuteranopia (green-blind)
#0062D1
Tritanopia (blue-blind)
#646585
Achromatopsia (no color)
#646464

Design tokens & code

CSS
--color: #7b40d4;
/* rgb */ color: rgb(123, 64, 212);
/* oklch */ color: oklch(52.6% 0.213 296.6);
Tailwind
colors: {
  custom: {
    50: '#a879e2',
    500: '#7b40d4',
    950: '#000000',
  },
}
SCSS
$custom: #7b40d4;
$custom-light: #a879e2;
$custom-dark: #000000;
JSON
{
  "hex": "#7b40d4",
  "rgb": {
    "r": 123,
    "g": 64,
    "b": 212
  },
  "hsl": {
    "h": 263.919,
    "s": 63.248,
    "l": 54.118
  },
  "oklch": {
    "l": 0.52634,
    "c": 0.2135,
    "h": 296.6
  },
  "luminance": 0.12631
}

Semantic roles & 50–950 ramp

primary
#7B40D4
secondary
#BED798
accent
#E642A5
background
#FAF7FE
surface
#F5EEFC
border
#CFC9D5
text
#110915
muted
#807B84

Preview Lab

Preview with #7B40D4

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

Preview Lab → · Contrast checker → · Palette generator →

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