#40345F#40345F

#40345F is a dark, moderate violet. Relative luminance 0.044; OKLCH L 35.9% C 0.074 H 295.3°. Best body text is #FFFFFF at 11.20:1 contrast (WCAG AA passes).

Color values

HEX#40345F
RGBrgb(64, 52, 95)
HSLhsl(257, 29%, 29%)
HSVhsv(257, 45%, 37%)
CMYKcmyk(32.6%, 45.3%, 0%, 62.7%)
CIE-LABlab(24.87, 16.16, -23.76)
CIE-LCHlch(24.87, 28.73, 304.22°)
OKLaboklab(35.87% 0.0315 -0.0666)
OKLCHoklch(35.87% 0.074 295.3)
XYZxyz(5.4074, 4.3721, 11.3833)
Luminance0.0437 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40345F #535F34
analogous
#343E5F #40345F #56345F
triadic
#40345F #5F4034 #345F40
tetradic
#40345F #5F343E #535F34 #345F56
square
#40345F #5F343E #535F34 #345F56
split-complementary
#40345F #5F5634 #3E5F34
monochromatic
#0D0B14 #251E37 #40345F #5B4A87 #7764AA

Accessibility & contrast

On white

11.20
#40345F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.87
#40345F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40345F
11.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40345F#FFFFFF#000000##FFFFFF
##40345F1.0011.201.8711.20
#FFFFFF11.201.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#273B61
Deuteranopia (green-blind)
#293A5E
Tritanopia (blue-blind)
#393C45
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #40345f;
/* rgb */ color: rgb(64, 52, 95);
/* oklch */ color: oklch(35.9% 0.074 295.3);
Tailwind
colors: {
  custom: {
    50: '#766b8c',
    500: '#40345f',
    950: '#000000',
  },
}
SCSS
$custom: #40345f;
$custom-light: #766b8c;
$custom-dark: #000000;
JSON
{
  "hex": "#40345f",
  "rgb": {
    "r": 64,
    "g": 52,
    "b": 95
  },
  "hsl": {
    "h": 256.744,
    "s": 29.252,
    "l": 28.824
  },
  "oklch": {
    "l": 0.35874,
    "c": 0.07363,
    "h": 295.3
  },
  "luminance": 0.04372
}

Semantic roles & 50–950 ramp

primary
#40345F
secondary
#82905F
accent
#C662AA
background
#F7F6F8
surface
#EDEBF0
border
#C8C6CB
text
#08060C
muted
#7B7A7D

Preview Lab

Preview with #40345F

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

Preview Lab → · Contrast checker → · Palette generator →

#40345F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva