#40175D#40175D

#40175D is a dark, vivid violet. Relative luminance 0.025; OKLCH L 30.7% C 0.120 H 307.5°. Best body text is #FFFFFF at 14.01:1 contrast (WCAG AA passes).

Color values

HEX#40175D
RGBrgb(64, 23, 93)
HSLhsl(275, 60%, 23%)
HSVhsv(275, 75%, 36%)
CMYKcmyk(31.2%, 75.3%, 0%, 63.5%)
CIE-LABlab(17.89, 33.41, -33.59)
CIE-LCHlch(17.89, 47.38, 314.85°)
OKLaboklab(30.69% 0.0731 -0.0952)
OKLCHoklch(30.69% 0.12 307.5)
XYZxyz(4.3961, 2.4932, 10.6034)
Luminance0.0249 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40175D #345D17
analogous
#1D175D #40175D #5D1757
triadic
#40175D #5D4017 #175D40
tetradic
#40175D #5D1D17 #345D17 #17575D
square
#40175D #5D1D17 #345D17 #17575D
split-complementary
#40175D #575D17 #175D1D
monochromatic
#110619 #1E0B2C #40175D #62238E #842FBF

Accessibility & contrast

On white

14.01
#40175D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.50
#40175D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40175D
14.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40175D#FFFFFF#000000##FFFFFF
##40175D1.0014.011.5014.01
#FFFFFF14.011.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF14.011.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #40175d;
/* rgb */ color: rgb(64, 23, 93);
/* oklch */ color: oklch(30.7% 0.120 307.5);
Tailwind
colors: {
  custom: {
    50: '#78588b',
    500: '#40175d',
    950: '#000000',
  },
}
SCSS
$custom: #40175d;
$custom-light: #78588b;
$custom-dark: #000000;
JSON
{
  "hex": "#40175d",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 93
  },
  "hsl": {
    "h": 275.143,
    "s": 60.345,
    "l": 22.745
  },
  "oklch": {
    "l": 0.30692,
    "c": 0.12009,
    "h": 307.5
  },
  "luminance": 0.02493
}

Semantic roles & 50–950 ramp

primary
#40175D
secondary
#60943C
accent
#E34486
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40175D

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

Preview Lab → · Contrast checker → · Palette generator →

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