#40295D#40295D

#40295D is a dark, moderate violet. Relative luminance 0.035; OKLCH L 33.6% C 0.091 H 302.2°. Best body text is #FFFFFF at 12.40:1 contrast (WCAG AA passes).

Color values

HEX#40295D
RGBrgb(64, 41, 93)
HSLhsl(267, 39%, 26%)
HSVhsv(267, 56%, 36%)
CMYKcmyk(31.2%, 55.9%, 0%, 63.5%)
CIE-LABlab(21.82, 22.84, -27.27)
CIE-LCHlch(21.82, 35.58, 309.95°)
OKLaboklab(33.56% 0.0483 -0.0768)
OKLCHoklch(33.56% 0.091 302.2)
XYZxyz(4.8826, 3.4662, 10.7656)
Luminance0.0347 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40295D #465D29
analogous
#292C5D #40295D #5A295D
triadic
#40295D #5D4029 #295D40
tetradic
#40295D #5D292C #465D29 #295D5A
square
#40295D #5D292C #465D29 #295D5A
split-complementary
#40295D #5D5A29 #2C5D29
monochromatic
#0F0915 #231633 #40295D #5D3C87 #7B4FB1

Accessibility & contrast

On white

12.40
#40295D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#40295D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40295D
12.40:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40295D#FFFFFF#000000##FFFFFF
##40295D1.0012.401.6912.40
#FFFFFF12.401.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.401.0021.001.00

Color blindness preview

Protanopia (red-blind)
#17345F
Deuteranopia (green-blind)
#1E345C
Tritanopia (blue-blind)
#3B333E
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #40295d;
/* rgb */ color: rgb(64, 41, 93);
/* oklch */ color: oklch(33.6% 0.091 302.2);
Tailwind
colors: {
  custom: {
    50: '#77638b',
    500: '#40295d',
    950: '#000000',
  },
}
SCSS
$custom: #40295d;
$custom-light: #77638b;
$custom-dark: #000000;
JSON
{
  "hex": "#40295d",
  "rgb": {
    "r": 64,
    "g": 41,
    "b": 93
  },
  "hsl": {
    "h": 266.538,
    "s": 38.806,
    "l": 26.275
  },
  "oklch": {
    "l": 0.33555,
    "c": 0.09074,
    "h": 302.2
  },
  "luminance": 0.03466
}

Semantic roles & 50–950 ramp

primary
#40295D
secondary
#749052
accent
#CF599B
background
#F7F5F8
surface
#EDEAF0
border
#C8C6CB
text
#09050C
muted
#7B797D

Preview Lab

Preview with #40295D

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

Preview Lab → · Contrast checker → · Palette generator →

#40295D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva