#40336F#40336F

#40336F is a dark, moderate violet. Relative luminance 0.046; OKLCH L 36.7% C 0.100 H 290.6°. Best body text is #FFFFFF at 10.93:1 contrast (WCAG AA passes).

Color values

HEX#40336F
RGBrgb(64, 51, 111)
HSLhsl(253, 37%, 32%)
HSVhsv(253, 54%, 44%)
CMYKcmyk(42.3%, 54.1%, 0%, 56.5%)
CIE-LABlab(25.58, 21.69, -32.96)
CIE-LCHlch(25.58, 39.46, 303.35°)
OKLaboklab(36.73% 0.0352 -0.0935)
OKLCHoklch(36.73% 0.1 290.6)
XYZxyz(6.1666, 4.6052, 15.5998)
Luminance0.0461 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40336F #626F33
analogous
#33446F #40336F #5E336F
triadic
#40336F #6F4033 #336F40
tetradic
#40336F #6F3344 #626F33 #336F5E
square
#40336F #6F3344 #626F33 #336F5E
split-complementary
#40336F #6F5E33 #446F33
monochromatic
#100C1B #282045 #40336F #584699 #7764B8

Accessibility & contrast

On white

10.93
#40336F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#40336F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40336F
10.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40336F#FFFFFF#000000##FFFFFF
##40336F1.0010.931.9210.93
#FFFFFF10.931.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1A3E71
Deuteranopia (green-blind)
#1B3B6E
Tritanopia (blue-blind)
#333F4C
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #40336f;
/* rgb */ color: rgb(64, 51, 111);
/* oklch */ color: oklch(36.7% 0.100 290.6);
Tailwind
colors: {
  custom: {
    50: '#786b99',
    500: '#40336f',
    950: '#000000',
  },
}
SCSS
$custom: #40336f;
$custom-light: #786b99;
$custom-dark: #000000;
JSON
{
  "hex": "#40336f",
  "rgb": {
    "r": 64,
    "g": 51,
    "b": 111
  },
  "hsl": {
    "h": 253,
    "s": 37.037,
    "l": 31.765
  },
  "oklch": {
    "l": 0.3673,
    "c": 0.09987,
    "h": 290.6
  },
  "luminance": 0.04605
}

Semantic roles & 50–950 ramp

primary
#40336F
secondary
#92A05E
accent
#CD5BB4
background
#F7F6F9
surface
#EDEBF2
border
#C8C6CC
text
#09060E
muted
#7B7A7E

Preview Lab

Preview with #40336F

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

Preview Lab → · Contrast checker → · Palette generator →

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