#40175F#40175F

#40175F is a dark, vivid violet. Relative luminance 0.025; OKLCH L 30.9% C 0.122 H 306.5°. Best body text is #FFFFFF at 13.95:1 contrast (WCAG AA passes).

Color values

HEX#40175F
RGBrgb(64, 23, 95)
HSLhsl(274, 61%, 23%)
HSVhsv(274, 76%, 37%)
CMYKcmyk(32.6%, 75.8%, 0%, 62.7%)
CIE-LABlab(18.05, 33.93, -34.66)
CIE-LCHlch(18.05, 48.50, 314.39°)
OKLaboklab(30.86% 0.0728 -0.0984)
OKLCHoklch(30.86% 0.122 306.5)
XYZxyz(4.4859, 2.5291, 11.0761)
Luminance0.0253 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40175F #365F17
analogous
#1C175F #40175F #5F175A
triadic
#40175F #5F4017 #175F40
tetradic
#40175F #5F1C17 #365F17 #175A5F
square
#40175F #5F1C17 #365F17 #175A5F
split-complementary
#40175F #5A5F17 #175F1C
monochromatic
#110619 #1F0B2E #40175F #612390 #822FC2

Accessibility & contrast

On white

13.95
#40175F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.51
#40175F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40175F
13.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40175F#FFFFFF#000000##FFFFFF
##40175F1.0013.951.5113.95
#FFFFFF13.951.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.951.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #40175f;
/* rgb */ color: rgb(64, 23, 95);
/* oklch */ color: oklch(30.9% 0.122 306.5);
Tailwind
colors: {
  custom: {
    50: '#78588d',
    500: '#40175f',
    950: '#000000',
  },
}
SCSS
$custom: #40175f;
$custom-light: #78588d;
$custom-dark: #000000;
JSON
{
  "hex": "#40175f",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 95
  },
  "hsl": {
    "h": 274.167,
    "s": 61.017,
    "l": 23.137
  },
  "oklch": {
    "l": 0.30859,
    "c": 0.12239,
    "h": 306.5
  },
  "luminance": 0.02529
}

Semantic roles & 50–950 ramp

primary
#40175F
secondary
#63963C
accent
#E44489
background
#F7F5F8
surface
#EEE9F0
border
#C9C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40175F

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

Preview Lab → · Contrast checker → · Palette generator →

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