#40165F#40165F

#40165F is a dark, vivid violet. Relative luminance 0.025; OKLCH L 30.7% C 0.124 H 306.7°. Best body text is #FFFFFF at 14.02:1 contrast (WCAG AA passes).

Color values

HEX#40165F
RGBrgb(64, 22, 95)
HSLhsl(275, 62%, 23%)
HSVhsv(275, 77%, 37%)
CMYKcmyk(32.6%, 76.8%, 0%, 62.7%)
CIE-LABlab(17.87, 34.42, -34.94)
CIE-LCHlch(17.87, 49.05, 314.57°)
OKLaboklab(30.73% 0.0739 -0.0992)
OKLCHoklch(30.73% 0.124 306.7)
XYZxyz(4.4664, 2.4901, 11.0696)
Luminance0.0249 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40165F #355F16
analogous
#1C165F #40165F #5F1659
triadic
#40165F #5F4016 #165F40
tetradic
#40165F #5F1C16 #355F16 #16595F
square
#40165F #5F1C16 #355F16 #16595F
split-complementary
#40165F #595F16 #165F1C
monochromatic
#110619 #1F0A2D #40165F #612291 #832DC2

Accessibility & contrast

On white

14.02
#40165F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.50
#40165F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40165F
14.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40165F#FFFFFF#000000##FFFFFF
##40165F1.0014.021.5014.02
#FFFFFF14.021.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF14.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A61
Deuteranopia (green-blind)
#002C5D
Tritanopia (blue-blind)
#3B2739
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #40165f;
/* rgb */ color: rgb(64, 22, 95);
/* oklch */ color: oklch(30.7% 0.124 306.7);
Tailwind
colors: {
  custom: {
    50: '#78578d',
    500: '#40165f',
    950: '#000000',
  },
}
SCSS
$custom: #40165f;
$custom-light: #78578d;
$custom-dark: #000000;
JSON
{
  "hex": "#40165f",
  "rgb": {
    "r": 64,
    "g": 22,
    "b": 95
  },
  "hsl": {
    "h": 274.521,
    "s": 62.393,
    "l": 22.941
  },
  "oklch": {
    "l": 0.30734,
    "c": 0.12374,
    "h": 306.7
  },
  "luminance": 0.0249
}

Semantic roles & 50–950 ramp

primary
#40165F
secondary
#62963B
accent
#E54288
background
#F7F5F8
surface
#EEE9F0
border
#C9C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40165F

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

Preview Lab → · Contrast checker → · Palette generator →

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