#40165D#40165D

#40165D is a dark, vivid violet. Relative luminance 0.025; OKLCH L 30.6% C 0.121 H 307.7°. Best body text is #FFFFFF at 14.09:1 contrast (WCAG AA passes).

Color values

HEX#40165D
RGBrgb(64, 22, 93)
HSLhsl(275, 62%, 23%)
HSVhsv(275, 76%, 36%)
CMYKcmyk(31.2%, 76.3%, 0%, 63.5%)
CIE-LABlab(17.71, 33.91, -33.88)
CIE-LCHlch(17.71, 47.93, 315.03°)
OKLaboklab(30.57% 0.0743 -0.0961)
OKLCHoklch(30.57% 0.121 307.7)
XYZxyz(4.3766, 2.4542, 10.5969)
Luminance0.0245 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40165D #335D16
analogous
#1D165D #40165D #5D1656
triadic
#40165D #5D4016 #165D40
tetradic
#40165D #5D1D16 #335D16 #16565D
square
#40165D #5D1D16 #335D16 #16565D
split-complementary
#40165D #565D16 #165D1D
monochromatic
#110619 #1E0A2C #40165D #62228E #842DC0

Accessibility & contrast

On white

14.09
#40165D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40165D
14.09:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40165D#FFFFFF#000000##FFFFFF
##40165D1.0014.091.4914.09
#FFFFFF14.091.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.091.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A5F
Deuteranopia (green-blind)
#032C5B
Tritanopia (blue-blind)
#3B2638
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #40165d;
/* rgb */ color: rgb(64, 22, 93);
/* oklch */ color: oklch(30.6% 0.121 307.7);
Tailwind
colors: {
  custom: {
    50: '#78578b',
    500: '#40165d',
    950: '#000000',
  },
}
SCSS
$custom: #40165d;
$custom-light: #78578b;
$custom-dark: #000000;
JSON
{
  "hex": "#40165d",
  "rgb": {
    "r": 64,
    "g": 22,
    "b": 93
  },
  "hsl": {
    "h": 275.493,
    "s": 61.739,
    "l": 22.549
  },
  "oklch": {
    "l": 0.30566,
    "c": 0.12147,
    "h": 307.7
  },
  "luminance": 0.02454
}

Semantic roles & 50–950 ramp

primary
#40165D
secondary
#5F943B
accent
#E54385
background
#F7F5F8
surface
#EEE9F0
border
#C9C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40165D

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

Preview Lab → · Contrast checker → · Palette generator →

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