#662AB2#662AB2

#662AB2 is a dark, vivid violet. Relative luminance 0.077; OKLCH L 45.0% C 0.199 H 297.8°. Best body text is #FFFFFF at 8.27:1 contrast (WCAG AA passes).

Color values

HEX#662AB2
RGBrgb(102, 42, 178)
HSLhsl(266, 62%, 43%)
HSVhsv(266, 76%, 70%)
CMYKcmyk(42.7%, 76.4%, 0%, 30.2%)
CIE-LABlab(33.34, 53.52, -61.49)
CIE-LCHlch(33.34, 81.52, 311.04°)
OKLaboklab(44.95% 0.0927 -0.1759)
OKLCHoklch(44.95% 0.199 297.8)
XYZxyz(14.3412, 7.6948, 42.8405)
Luminance0.0770 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#662AB2 #76B22A
analogous
#2A32B2 #662AB2 #AA2AB2
triadic
#662AB2 #B2662A #2AB266
tetradic
#662AB2 #B22A32 #76B22A #2AB2AA
square
#662AB2 #B22A32 #76B22A #2AB2AA
split-complementary
#662AB2 #B2AA2A #32B22A
monochromatic
#2D134F #4A1E80 #662AB2 #8446D3 #A577DF

Accessibility & contrast

On white

8.27
#662AB2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.54
#662AB2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #662AB2
8.27:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##662AB2#FFFFFF#000000##FFFFFF
##662AB21.008.272.548.27
#FFFFFF8.271.0021.001.00
#0000002.5421.001.0021.00
##FFFFFF8.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004FB6
Deuteranopia (green-blind)
#004DAF
Tritanopia (blue-blind)
#534E6D
Achromatopsia (no color)
#4E4E4E

Design tokens & code

CSS
--color: #662ab2;
/* rgb */ color: rgb(102, 42, 178);
/* oklch */ color: oklch(45.0% 0.199 297.8);
Tailwind
colors: {
  custom: {
    50: '#996aca',
    500: '#662ab2',
    950: '#000000',
  },
}
SCSS
$custom: #662ab2;
$custom-light: #996aca;
$custom-dark: #000000;
JSON
{
  "hex": "#662ab2",
  "rgb": {
    "r": 102,
    "g": 42,
    "b": 178
  },
  "hsl": {
    "h": 266.471,
    "s": 61.818,
    "l": 43.137
  },
  "oklch": {
    "l": 0.44954,
    "c": 0.19886,
    "h": 297.8
  },
  "luminance": 0.07695
}

Semantic roles & 50–950 ramp

primary
#662AB2
secondary
#A1C771
accent
#E5439D
background
#F9F6FC
surface
#F2EBF9
border
#CCC6D2
text
#0F0713
muted
#7E7A82

Preview Lab

Preview with #662AB2

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

Preview Lab → · Contrast checker → · Palette generator →

#662AB2 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva