#40175B#40175B

#40175B is a dark, moderate violet. Relative luminance 0.025; OKLCH L 30.5% C 0.118 H 308.6°. Best body text is #FFFFFF at 14.08:1 contrast (WCAG AA passes).

Color values

HEX#40175B
RGBrgb(64, 23, 91)
HSLhsl(276, 60%, 22%)
HSVhsv(276, 75%, 36%)
CMYKcmyk(29.7%, 74.7%, 0%, 64.3%)
CIE-LABlab(17.73, 32.90, -32.51)
CIE-LCHlch(17.73, 46.25, 315.34°)
OKLaboklab(30.53% 0.0734 -0.0921)
OKLCHoklch(30.53% 0.118 308.6)
XYZxyz(4.3087, 2.4582, 10.1430)
Luminance0.0246 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40175B #325B17
analogous
#1E175B #40175B #5B1754
triadic
#40175B #5B4017 #175B40
tetradic
#40175B #5B1E17 #325B17 #17545B
square
#40175B #5B1E17 #325B17 #17545B
split-complementary
#40175B #545B17 #175B1E
monochromatic
#110618 #1E0B2A #40175B #62238C #8530BD

Accessibility & contrast

On white

14.08
#40175B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.49
#40175B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40175B
14.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40175B#FFFFFF#000000##FFFFFF
##40175B1.0014.081.4914.08
#FFFFFF14.081.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A5D
Deuteranopia (green-blind)
#082C5A
Tritanopia (blue-blind)
#3C2637
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #40175b;
/* rgb */ color: rgb(64, 23, 91);
/* oklch */ color: oklch(30.5% 0.118 308.6);
Tailwind
colors: {
  custom: {
    50: '#78588a',
    500: '#40175b',
    950: '#000000',
  },
}
SCSS
$custom: #40175b;
$custom-light: #78588a;
$custom-dark: #000000;
JSON
{
  "hex": "#40175b",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 91
  },
  "hsl": {
    "h": 276.176,
    "s": 59.649,
    "l": 22.353
  },
  "oklch": {
    "l": 0.30528,
    "c": 0.11778,
    "h": 308.6
  },
  "luminance": 0.02458
}

Semantic roles & 50–950 ramp

primary
#40175B
secondary
#5E923C
accent
#E34584
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40175B

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

Preview Lab → · Contrast checker → · Palette generator →

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