#40165A#40165A

#40165A is a dark, moderate violet. Relative luminance 0.024; OKLCH L 30.3% C 0.118 H 309.3°. Best body text is #FFFFFF at 14.19:1 contrast (WCAG AA passes).

Color values

HEX#40165A
RGBrgb(64, 22, 90)
HSLhsl(277, 61%, 22%)
HSVhsv(277, 76%, 35%)
CMYKcmyk(28.9%, 75.6%, 0%, 64.7%)
CIE-LABlab(17.47, 33.15, -32.26)
CIE-LCHlch(17.47, 46.26, 315.78°)
OKLaboklab(30.32% 0.0748 -0.0913)
OKLCHoklch(30.32% 0.118 309.3)
XYZxyz(4.2464, 2.4021, 9.9108)
Luminance0.0240 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40165A #305A16
analogous
#1E165A #40165A #5A1652
triadic
#40165A #5A4016 #165A40
tetradic
#40165A #5A1E16 #305A16 #16525A
square
#40165A #5A1E16 #305A16 #16525A
split-complementary
#40165A #525A16 #165A1E
monochromatic
#110619 #1D0A29 #40165A #63228B #862EBC

Accessibility & contrast

On white

14.19
#40165A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.48
#40165A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40165A
14.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40165A#FFFFFF#000000##FFFFFF
##40165A1.0014.191.4814.19
#FFFFFF14.191.0021.001.00
#0000001.4821.001.0021.00
##FFFFFF14.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00295C
Deuteranopia (green-blind)
#082B59
Tritanopia (blue-blind)
#3C2536
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #40165a;
/* rgb */ color: rgb(64, 22, 90);
/* oklch */ color: oklch(30.3% 0.118 309.3);
Tailwind
colors: {
  custom: {
    50: '#785789',
    500: '#40165a',
    950: '#000000',
  },
}
SCSS
$custom: #40165a;
$custom-light: #785789;
$custom-dark: #000000;
JSON
{
  "hex": "#40165a",
  "rgb": {
    "r": 64,
    "g": 22,
    "b": 90
  },
  "hsl": {
    "h": 277.059,
    "s": 60.714,
    "l": 21.961
  },
  "oklch": {
    "l": 0.30319,
    "c": 0.11804,
    "h": 309.3
  },
  "luminance": 0.02402
}

Semantic roles & 50–950 ramp

primary
#40165A
secondary
#5C913B
accent
#E44481
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09030B
muted
#7B787C

Preview Lab

Preview with #40165A

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

Preview Lab → · Contrast checker → · Palette generator →

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