#7F40CC#7F40CC

#7F40CC is a mid, highly saturated violet. Relative luminance 0.125; OKLCH L 52.4% C 0.205 H 299.9°. Best body text is #FFFFFF at 5.99:1 contrast (WCAG AA passes).

Color values

HEX#7F40CC
RGBrgb(127, 64, 204)
HSLhsl(267, 58%, 53%)
HSVhsv(267, 69%, 80%)
CMYKcmyk(37.7%, 68.6%, 0%, 20%)
CIE-LABlab(42.06, 54.31, -62.40)
CIE-LCHlch(42.06, 82.73, 311.04°)
OKLaboklab(52.45% 0.1023 -0.1779)
OKLCHoklch(52.45% 0.205 299.9)
XYZxyz(21.4822, 12.5382, 58.4034)
Luminance0.1254 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7F40CC #8DCC40
analogous
#4047CC #7F40CC #C540CC
triadic
#7F40CC #CC7F40 #40CC7F
tetradic
#7F40CC #CC4047 #8DCC40 #40CCC5
square
#7F40CC #CC4047 #8DCC40 #40CCC5
split-complementary
#7F40CC #CCC540 #47CC40
monochromatic
#451F73 #612CA3 #7F40CC #9F70D9 #C0A1E6

Accessibility & contrast

On white

5.99
#7F40CC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.51
#7F40CC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7F40CC
5.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7F40CC#FFFFFF#000000##FFFFFF
##7F40CC1.005.993.515.99
#FFFFFF5.991.0021.001.00
#0000003.5121.001.0021.00
##FFFFFF5.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0063D0
Deuteranopia (green-blind)
#0062C9
Tritanopia (blue-blind)
#6E6181
Achromatopsia (no color)
#636363

Design tokens & code

CSS
--color: #7f40cc;
/* rgb */ color: rgb(127, 64, 204);
/* oklch */ color: oklch(52.4% 0.205 299.9);
Tailwind
colors: {
  custom: {
    50: '#aa79dc',
    500: '#7f40cc',
    950: '#000000',
  },
}
SCSS
$custom: #7f40cc;
$custom-light: #aa79dc;
$custom-dark: #000000;
JSON
{
  "hex": "#7f40cc",
  "rgb": {
    "r": 127,
    "g": 64,
    "b": 204
  },
  "hsl": {
    "h": 267,
    "s": 57.851,
    "l": 52.549
  },
  "oklch": {
    "l": 0.52446,
    "c": 0.20521,
    "h": 299.9
  },
  "luminance": 0.12538
}

Semantic roles & 50–950 ramp

primary
#7F40CC
secondary
#B7D295
accent
#E1479C
background
#FAF7FD
surface
#F5EEFB
border
#CFC9D4
text
#110915
muted
#807B83

Preview Lab

Preview with #7F40CC

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

Preview Lab → · Contrast checker → · Palette generator →

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