#40337F#40337F

#40337F is a dark, vivid violet. Relative luminance 0.050; OKLCH L 37.9% C 0.123 H 286.8°. Best body text is #FFFFFF at 10.51:1 contrast (WCAG AA passes).

Color values

HEX#40337F
RGBrgb(64, 51, 127)
HSLhsl(250, 43%, 35%)
HSVhsv(250, 60%, 50%)
CMYKcmyk(49.6%, 59.8%, 0%, 50.2%)
CIE-LABlab(26.71, 26.78, -41.30)
CIE-LCHlch(26.71, 49.22, 302.96°)
OKLaboklab(37.92% 0.0357 -0.118)
OKLCHoklch(37.92% 0.123 286.8)
XYZxyz(7.1278, 4.9896, 20.6621)
Luminance0.0499 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40337F #727F33
analogous
#334C7F #40337F #66337F
triadic
#40337F #7F4033 #337F40
tetradic
#40337F #7F334C #727F33 #337F66
square
#40337F #7F334C #727F33 #337F66
split-complementary
#40337F #7F6633 #4C7F33
monochromatic
#141028 #2A2153 #40337F #5645AB #7969C3

Accessibility & contrast

On white

10.51
#40337F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.00
#40337F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40337F
10.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40337F#FFFFFF#000000##FFFFFF
##40337F1.0010.512.0010.51
#FFFFFF10.511.0021.001.00
#0000002.0021.001.0021.00
##FFFFFF10.511.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004182
Deuteranopia (green-blind)
#003D7D
Tritanopia (blue-blind)
#2B4454
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #40337f;
/* rgb */ color: rgb(64, 51, 127);
/* oklch */ color: oklch(37.9% 0.123 286.8);
Tailwind
colors: {
  custom: {
    50: '#7a6ba5',
    500: '#40337f',
    950: '#000000',
  },
}
SCSS
$custom: #40337f;
$custom-light: #7a6ba5;
$custom-dark: #000000;
JSON
{
  "hex": "#40337f",
  "rgb": {
    "r": 64,
    "g": 51,
    "b": 127
  },
  "hsl": {
    "h": 250.263,
    "s": 42.697,
    "l": 34.902
  },
  "oklch": {
    "l": 0.37925,
    "c": 0.12325,
    "h": 286.8
  },
  "luminance": 0.0499
}

Semantic roles & 50–950 ramp

primary
#40337F
secondary
#9FAB63
accent
#D255BD
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A060F
muted
#7C7A7F

Preview Lab

Preview with #40337F

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

Preview Lab → · Contrast checker → · Palette generator →

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