#40165C#40165C

#40165C is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.5% C 0.120 H 308.2°. Best body text is #FFFFFF at 14.12:1 contrast (WCAG AA passes).

Color values

HEX#40165C
RGBrgb(64, 22, 92)
HSLhsl(276, 61%, 22%)
HSVhsv(276, 76%, 36%)
CMYKcmyk(30.4%, 76.1%, 0%, 63.9%)
CIE-LABlab(17.63, 33.66, -33.34)
CIE-LCHlch(17.63, 47.37, 315.27°)
OKLaboklab(30.48% 0.0745 -0.0945)
OKLCHoklch(30.48% 0.12 308.2)
XYZxyz(4.3326, 2.4366, 10.3652)
Luminance0.0244 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40165C #325C16
analogous
#1D165C #40165C #5C1655
triadic
#40165C #5C4016 #165C40
tetradic
#40165C #5C1D16 #325C16 #16555C
square
#40165C #5C1D16 #325C16 #16555C
split-complementary
#40165C #555C16 #165C1D
monochromatic
#110619 #1E0A2B #40165C #62228D #852EBF

Accessibility & contrast

On white

14.12
#40165C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.49
#40165C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40165C
14.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40165C#FFFFFF#000000##FFFFFF
##40165C1.0014.121.4914.12
#FFFFFF14.121.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A5E
Deuteranopia (green-blind)
#042C5B
Tritanopia (blue-blind)
#3C2637
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #40165c;
/* rgb */ color: rgb(64, 22, 92);
/* oklch */ color: oklch(30.5% 0.120 308.2);
Tailwind
colors: {
  custom: {
    50: '#78578b',
    500: '#40165c',
    950: '#000000',
  },
}
SCSS
$custom: #40165c;
$custom-light: #78578b;
$custom-dark: #000000;
JSON
{
  "hex": "#40165c",
  "rgb": {
    "r": 64,
    "g": 22,
    "b": 92
  },
  "hsl": {
    "h": 276,
    "s": 61.404,
    "l": 22.353
  },
  "oklch": {
    "l": 0.30483,
    "c": 0.12032,
    "h": 308.2
  },
  "luminance": 0.02437
}

Semantic roles & 50–950 ramp

primary
#40165C
secondary
#5E933B
accent
#E54384
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40165C

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

Preview Lab → · Contrast checker → · Palette generator →

#40165C Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva