#5240AB#5240AB

#5240AB is a mid, vivid violet. Relative luminance 0.084; OKLCH L 45.3% C 0.164 H 285.5°. Best body text is #FFFFFF at 7.84:1 contrast (WCAG AA passes).

Color values

HEX#5240AB
RGBrgb(82, 64, 171)
HSLhsl(250, 46%, 46%)
HSVhsv(250, 63%, 67%)
CMYKcmyk(52%, 62.6%, 0%, 32.9%)
CIE-LABlab(34.80, 36.38, -55.02)
CIE-LCHlch(34.80, 65.96, 303.48°)
OKLaboklab(45.33% 0.0439 -0.1577)
OKLCHoklch(45.33% 0.164 285.5)
XYZxyz(12.6616, 8.4003, 39.4744)
Luminance0.0840 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5240AB #99AB40
analogous
#4063AB #5240AB #8740AB
triadic
#5240AB #AB5240 #40AB52
tetradic
#5240AB #AB4063 #99AB40 #40AB87
square
#5240AB #AB4063 #99AB40 #40AB87
split-complementary
#5240AB #AB8740 #63AB40
monochromatic
#271F52 #3D2F7E #5240AB #7463C5 #9C90D5

Accessibility & contrast

On white

7.84
#5240AB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.68
#5240AB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5240AB
7.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5240AB#FFFFFF#000000##FFFFFF
##5240AB1.007.842.687.84
#FFFFFF7.841.0021.001.00
#0000002.6821.001.0021.00
##FFFFFF7.841.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0055AE
Deuteranopia (green-blind)
#004FA9
Tritanopia (blue-blind)
#305A6F
Achromatopsia (no color)
#525252

Design tokens & code

CSS
--color: #5240ab;
/* rgb */ color: rgb(82, 64, 171);
/* oklch */ color: oklch(45.3% 0.164 285.5);
Tailwind
colors: {
  custom: {
    50: '#8a76c5',
    500: '#5240ab',
    950: '#000000',
  },
}
SCSS
$custom: #5240ab;
$custom-light: #8a76c5;
$custom-dark: #000000;
JSON
{
  "hex": "#5240ab",
  "rgb": {
    "r": 82,
    "g": 64,
    "b": 171
  },
  "hsl": {
    "h": 250.093,
    "s": 45.532,
    "l": 46.078
  },
  "oklch": {
    "l": 0.45326,
    "c": 0.16368,
    "h": 285.5
  },
  "luminance": 0.08401
}

Semantic roles & 50–950 ramp

primary
#5240AB
secondary
#B7C186
accent
#D553BF
background
#F8F7FC
surface
#F0EDF8
border
#CBC8D1
text
#0D0813
muted
#7D7B82

Preview Lab

Preview with #5240AB

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

Preview Lab → · Contrast checker → · Palette generator →

#5240AB Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva