#6040B2#6040B2

#6040B2 is a mid, vivid violet. Relative luminance 0.094; OKLCH L 47.2% C 0.172 H 291.3°. Best body text is #FFFFFF at 7.31:1 contrast (WCAG AA passes).

Color values

HEX#6040B2
RGBrgb(96, 64, 178)
HSLhsl(257, 47%, 47%)
HSVhsv(257, 64%, 70%)
CMYKcmyk(46.1%, 64%, 0%, 30.2%)
CIE-LABlab(36.68, 41.25, -56.07)
CIE-LCHlch(36.68, 69.61, 306.35°)
OKLaboklab(47.18% 0.0625 -0.1603)
OKLCHoklch(47.18% 0.172 291.3)
XYZxyz(14.6909, 9.3674, 43.1449)
Luminance0.0937 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#6040B2 #92B240
analogous
#4059B2 #6040B2 #9940B2
triadic
#6040B2 #B26040 #40B260
tetradic
#6040B2 #B24059 #92B240 #40B299
square
#6040B2 #B24059 #92B240 #40B299
split-complementary
#6040B2 #B29940 #59B240
monochromatic
#2F2058 #483085 #6040B2 #8267C8 #A794D8

Accessibility & contrast

On white

7.31
#6040B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.87
#6040B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #6040B2
7.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##6040B2#FFFFFF#000000##FFFFFF
##6040B21.007.312.877.31
#FFFFFF7.311.0021.001.00
#0000002.8721.001.0021.00
##FFFFFF7.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0058B6
Deuteranopia (green-blind)
#0054B0
Tritanopia (blue-blind)
#475B73
Achromatopsia (no color)
#565656

Design tokens & code

CSS
--color: #6040b2;
/* rgb */ color: rgb(96, 64, 178);
/* oklch */ color: oklch(47.2% 0.172 291.3);
Tailwind
colors: {
  custom: {
    50: '#9477ca',
    500: '#6040b2',
    950: '#000000',
  },
}
SCSS
$custom: #6040b2;
$custom-light: #9477ca;
$custom-dark: #000000;
JSON
{
  "hex": "#6040b2",
  "rgb": {
    "r": 96,
    "g": 64,
    "b": 178
  },
  "hsl": {
    "h": 256.842,
    "s": 47.107,
    "l": 47.451
  },
  "oklch": {
    "l": 0.47184,
    "c": 0.17208,
    "h": 291.3
  },
  "luminance": 0.09368
}

Semantic roles & 50–950 ramp

primary
#6040B2
secondary
#B4C48A
accent
#D751B1
background
#F9F7FC
surface
#F2EDF8
border
#CCC8D1
text
#0E0913
muted
#7E7B82

Preview Lab

Preview with #6040B2

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

Preview Lab → · Contrast checker → · Palette generator →

#6040B2 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva