#40165E#40165E

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

Color values

HEX#40165E
RGBrgb(64, 22, 94)
HSLhsl(275, 62%, 23%)
HSVhsv(275, 77%, 37%)
CMYKcmyk(31.9%, 76.6%, 0%, 63.1%)
CIE-LABlab(17.79, 34.17, -34.41)
CIE-LCHlch(17.79, 48.49, 314.80°)
OKLaboklab(30.65% 0.0741 -0.0977)
OKLCHoklch(30.65% 0.123 307.2)
XYZxyz(4.4212, 2.4720, 10.8317)
Luminance0.0247 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40165E #345E16
analogous
#1C165E #40165E #5E1658
triadic
#40165E #5E4016 #165E40
tetradic
#40165E #5E1C16 #345E16 #16585E
square
#40165E #5E1C16 #345E16 #16585E
split-complementary
#40165E #585E16 #165E1C
monochromatic
#110619 #1E0A2C #40165E #622290 #842DC1

Accessibility & contrast

On white

14.05
#40165E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40165E
14.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40165E#FFFFFF#000000##FFFFFF
##40165E1.0014.051.4914.05
#FFFFFF14.051.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A60
Deuteranopia (green-blind)
#012C5C
Tritanopia (blue-blind)
#3B2738
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #40165e;
/* rgb */ color: rgb(64, 22, 94);
/* oklch */ color: oklch(30.6% 0.123 307.2);
Tailwind
colors: {
  custom: {
    50: '#78578c',
    500: '#40165e',
    950: '#000000',
  },
}
SCSS
$custom: #40165e;
$custom-light: #78578c;
$custom-dark: #000000;
JSON
{
  "hex": "#40165e",
  "rgb": {
    "r": 64,
    "g": 22,
    "b": 94
  },
  "hsl": {
    "h": 275,
    "s": 62.069,
    "l": 22.745
  },
  "oklch": {
    "l": 0.3065,
    "c": 0.1226,
    "h": 307.2
  },
  "luminance": 0.02472
}

Semantic roles & 50–950 ramp

primary
#40165E
secondary
#60953B
accent
#E54386
background
#F7F5F8
surface
#EEE9F0
border
#C9C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40165E

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

Preview Lab → · Contrast checker → · Palette generator →

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