#40304C#40304C

#40304C is a dark, muted violet. Relative luminance 0.037; OKLCH L 33.9% C 0.052 H 309.9°. Best body text is #FFFFFF at 12.03:1 contrast (WCAG AA passes).

Color values

HEX#40304C
RGBrgb(64, 48, 76)
HSLhsl(274, 23%, 24%)
HSVhsv(274, 37%, 30%)
CMYKcmyk(15.8%, 36.8%, 0%, 70.2%)
CIE-LABlab(22.74, 13.56, -14.52)
CIE-LCHlch(22.74, 19.87, 313.03°)
OKLaboklab(33.94% 0.0334 -0.0399)
OKLCHoklch(33.94% 0.052 309.9)
XYZxyz(4.4756, 3.7257, 7.3194)
Luminance0.0373 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40304C #3C4C30
analogous
#32304C #40304C #4C304A
triadic
#40304C #4C4030 #304C40
tetradic
#40304C #4C3230 #3C4C30 #304A4C
square
#40304C #4C3230 #3C4C30 #304A4C
split-complementary
#40304C #4A4C30 #304C32
monochromatic
#100C13 #201826 #40304C #604872 #7F5F97

Accessibility & contrast

On white

12.03
#40304C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#40304C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40304C
12.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40304C#FFFFFF#000000##FFFFFF
##40304C1.0012.031.7512.03
#FFFFFF12.031.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF12.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2B364D
Deuteranopia (green-blind)
#2E374B
Tritanopia (blue-blind)
#3F343A
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40304c;
/* rgb */ color: rgb(64, 48, 76);
/* oklch */ color: oklch(33.9% 0.052 309.9);
Tailwind
colors: {
  custom: {
    50: '#75687e',
    500: '#40304c',
    950: '#000000',
  },
}
SCSS
$custom: #40304c;
$custom-light: #75687e;
$custom-dark: #000000;
JSON
{
  "hex": "#40304c",
  "rgb": {
    "r": 64,
    "g": 48,
    "b": 76
  },
  "hsl": {
    "h": 274.286,
    "s": 22.581,
    "l": 24.314
  },
  "oklch": {
    "l": 0.33936,
    "c": 0.05208,
    "h": 309.9
  },
  "luminance": 0.03726
}

Semantic roles & 50–950 ramp

primary
#40304C
secondary
#697D5B
accent
#BF698E
background
#F7F6F7
surface
#EDEBEE
border
#C8C6C9
text
#08060A
muted
#7B7A7C

Preview Lab

Preview with #40304C

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

Preview Lab → · Contrast checker → · Palette generator →

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