#40175A#40175A

#40175A is a dark, moderate violet. Relative luminance 0.024; OKLCH L 30.4% C 0.117 H 309.1°. Best body text is #FFFFFF at 14.11:1 contrast (WCAG AA passes).

Color values

HEX#40175A
RGBrgb(64, 23, 90)
HSLhsl(277, 59%, 22%)
HSVhsv(277, 74%, 35%)
CMYKcmyk(28.9%, 74.4%, 0%, 64.7%)
CIE-LABlab(17.65, 32.65, -31.97)
CIE-LCHlch(17.65, 45.69, 315.60°)
OKLaboklab(30.45% 0.0736 -0.0905)
OKLCHoklch(30.45% 0.117 309.1)
XYZxyz(4.2658, 2.4410, 9.9173)
Luminance0.0244 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40175A #315A17
analogous
#1E175A #40175A #5A1753
triadic
#40175A #5A4017 #175A40
tetradic
#40175A #5A1E17 #315A17 #17535A
square
#40175A #5A1E17 #315A17 #17535A
split-complementary
#40175A #535A17 #175A1E
monochromatic
#110618 #1D0B29 #40175A #63238B #8530BB

Accessibility & contrast

On white

14.11
#40175A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40175A
14.11:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40175A#FFFFFF#000000##FFFFFF
##40175A1.0014.111.4914.11
#FFFFFF14.111.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.111.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A5C
Deuteranopia (green-blind)
#0A2C59
Tritanopia (blue-blind)
#3C2636
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #40175a;
/* rgb */ color: rgb(64, 23, 90);
/* oklch */ color: oklch(30.4% 0.117 309.1);
Tailwind
colors: {
  custom: {
    50: '#785889',
    500: '#40175a',
    950: '#000000',
  },
}
SCSS
$custom: #40175a;
$custom-light: #785889;
$custom-dark: #000000;
JSON
{
  "hex": "#40175a",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 90
  },
  "hsl": {
    "h": 276.716,
    "s": 59.292,
    "l": 22.157
  },
  "oklch": {
    "l": 0.30447,
    "c": 0.11662,
    "h": 309.1
  },
  "luminance": 0.02441
}

Semantic roles & 50–950 ramp

primary
#40175A
secondary
#5D913C
accent
#E24582
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09030B
muted
#7B787C

Preview Lab

Preview with #40175A

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

Preview Lab → · Contrast checker → · Palette generator →

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