#40337E#40337E

#40337E is a dark, vivid violet. Relative luminance 0.050; OKLCH L 37.8% C 0.122 H 287.0°. Best body text is #FFFFFF at 10.54:1 contrast (WCAG AA passes).

Color values

HEX#40337E
RGBrgb(64, 51, 126)
HSLhsl(250, 42%, 35%)
HSVhsv(250, 60%, 49%)
CMYKcmyk(49.2%, 59.5%, 0%, 50.6%)
CIE-LABlab(26.63, 26.46, -40.79)
CIE-LCHlch(26.63, 48.62, 302.97°)
OKLaboklab(37.85% 0.0357 -0.1165)
OKLCHoklch(37.85% 0.122 287)
XYZxyz(7.0630, 4.9637, 20.3206)
Luminance0.0496 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40337E #717E33
analogous
#334C7E #40337E #66337E
triadic
#40337E #7E4033 #337E40
tetradic
#40337E #7E334C #717E33 #337E66
square
#40337E #7E334C #717E33 #337E66
split-complementary
#40337E #7E6633 #4C7E33
monochromatic
#141027 #2A2152 #40337E #5645AA #7969C2

Accessibility & contrast

On white

10.54
#40337E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.99
#40337E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40337E
10.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40337E#FFFFFF#000000##FFFFFF
##40337E1.0010.541.9910.54
#FFFFFF10.541.0021.001.00
#0000001.9921.001.0021.00
##FFFFFF10.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004181
Deuteranopia (green-blind)
#003D7C
Tritanopia (blue-blind)
#2B4453
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #40337e;
/* rgb */ color: rgb(64, 51, 126);
/* oklch */ color: oklch(37.8% 0.122 287.0);
Tailwind
colors: {
  custom: {
    50: '#7a6ba4',
    500: '#40337e',
    950: '#000000',
  },
}
SCSS
$custom: #40337e;
$custom-light: #7a6ba4;
$custom-dark: #000000;
JSON
{
  "hex": "#40337e",
  "rgb": {
    "r": 64,
    "g": 51,
    "b": 126
  },
  "hsl": {
    "h": 250.4,
    "s": 42.373,
    "l": 34.706
  },
  "oklch": {
    "l": 0.37847,
    "c": 0.12182,
    "h": 287
  },
  "luminance": 0.04964
}

Semantic roles & 50–950 ramp

primary
#40337E
secondary
#9EAA63
accent
#D256BD
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A060F
muted
#7C7A7F

Preview Lab

Preview with #40337E

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

Preview Lab → · Contrast checker → · Palette generator →

#40337E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva