#40175C#40175C

#40175C is a dark, moderate violet. Relative luminance 0.025; OKLCH L 30.6% C 0.119 H 308.0°. Best body text is #FFFFFF at 14.05:1 contrast (WCAG AA passes).

Color values

HEX#40175C
RGBrgb(64, 23, 92)
HSLhsl(276, 60%, 23%)
HSVhsv(276, 75%, 36%)
CMYKcmyk(30.4%, 75%, 0%, 63.9%)
CIE-LABlab(17.81, 33.15, -33.05)
CIE-LCHlch(17.81, 46.81, 315.09°)
OKLaboklab(30.61% 0.0733 -0.0937)
OKLCHoklch(30.61% 0.119 308)
XYZxyz(4.3521, 2.4756, 10.3717)
Luminance0.0248 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40175C #335C17
analogous
#1D175C #40175C #5C1756
triadic
#40175C #5C4017 #175C40
tetradic
#40175C #5C1D17 #335C17 #17565C
square
#40175C #5C1D17 #335C17 #17565C
split-complementary
#40175C #565C17 #175C1D
monochromatic
#110618 #1E0B2B #40175C #62238D #842FBE

Accessibility & contrast

On white

14.05
#40175C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40175C
14.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40175C#FFFFFF#000000##FFFFFF
##40175C1.0014.051.5014.05
#FFFFFF14.051.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF14.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A5E
Deuteranopia (green-blind)
#062C5B
Tritanopia (blue-blind)
#3C2637
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #40175c;
/* rgb */ color: rgb(64, 23, 92);
/* oklch */ color: oklch(30.6% 0.119 308.0);
Tailwind
colors: {
  custom: {
    50: '#78588b',
    500: '#40175c',
    950: '#000000',
  },
}
SCSS
$custom: #40175c;
$custom-light: #78588b;
$custom-dark: #000000;
JSON
{
  "hex": "#40175c",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 92
  },
  "hsl": {
    "h": 275.652,
    "s": 60,
    "l": 22.549
  },
  "oklch": {
    "l": 0.3061,
    "c": 0.11893,
    "h": 308
  },
  "luminance": 0.02475
}

Semantic roles & 50–950 ramp

primary
#40175C
secondary
#5F933C
accent
#E34585
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40175C

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

Preview Lab → · Contrast checker → · Palette generator →

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