#40337C#40337C

#40337C is a dark, moderate violet. Relative luminance 0.049; OKLCH L 37.7% C 0.119 H 287.5°. Best body text is #FFFFFF at 10.59:1 contrast (WCAG AA passes).

Color values

HEX#40337C
RGBrgb(64, 51, 124)
HSLhsl(251, 42%, 34%)
HSVhsv(251, 59%, 49%)
CMYKcmyk(48.4%, 58.9%, 0%, 51.4%)
CIE-LABlab(26.48, 25.81, -39.77)
CIE-LCHlch(26.48, 47.41, 302.99°)
OKLaboklab(37.69% 0.0357 -0.1135)
OKLCHoklch(37.69% 0.119 287.5)
XYZxyz(6.9352, 4.9126, 19.6477)
Luminance0.0491 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40337C #6F7C33
analogous
#334B7C #40337C #65337C
triadic
#40337C #7C4033 #337C40
tetradic
#40337C #7C334B #6F7C33 #337C65
square
#40337C #7C334B #6F7C33 #337C65
split-complementary
#40337C #7C6533 #4B7C33
monochromatic
#130F25 #2A2151 #40337C #5645A7 #7868C1

Accessibility & contrast

On white

10.59
#40337C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.98
#40337C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40337C
10.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40337C#FFFFFF#000000##FFFFFF
##40337C1.0010.591.9810.59
#FFFFFF10.591.0021.001.00
#0000001.9821.001.0021.00
##FFFFFF10.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#04407E
Deuteranopia (green-blind)
#053D7A
Tritanopia (blue-blind)
#2D4352
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #40337c;
/* rgb */ color: rgb(64, 51, 124);
/* oklch */ color: oklch(37.7% 0.119 287.5);
Tailwind
colors: {
  custom: {
    50: '#7a6ba2',
    500: '#40337c',
    950: '#000000',
  },
}
SCSS
$custom: #40337c;
$custom-light: #7a6ba2;
$custom-dark: #000000;
JSON
{
  "hex": "#40337c",
  "rgb": {
    "r": 64,
    "g": 51,
    "b": 124
  },
  "hsl": {
    "h": 250.685,
    "s": 41.714,
    "l": 34.314
  },
  "oklch": {
    "l": 0.37692,
    "c": 0.11895,
    "h": 287.5
  },
  "luminance": 0.04913
}

Semantic roles & 50–950 ramp

primary
#40337C
secondary
#9CA962
accent
#D256BC
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#09060F
muted
#7B7A7F

Preview Lab

Preview with #40337C

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

Preview Lab → · Contrast checker → · Palette generator →

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