#40338B#40338B

#40338B is a dark, vivid blue. Relative luminance 0.053; OKLCH L 38.9% C 0.140 H 284.5°. Best body text is #FFFFFF at 10.17:1 contrast (WCAG AA passes).

Color values

HEX#40338B
RGBrgb(64, 51, 139)
HSLhsl(249, 46%, 37%)
HSVhsv(249, 63%, 55%)
CMYKcmyk(54%, 63.3%, 0%, 45.5%)
CIE-LABlab(27.63, 30.66, -47.29)
CIE-LCHlch(27.63, 56.36, 302.96°)
OKLaboklab(38.9% 0.0352 -0.1356)
OKLCHoklch(38.9% 0.14 284.5)
XYZxyz(7.9570, 5.3213, 25.0289)
Luminance0.0532 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40338B #7E8B33
analogous
#33528B #40338B #6C338B
triadic
#40338B #8B4033 #338B40
tetradic
#40338B #8B3352 #7E8B33 #338B6C
square
#40338B #8B3352 #7E8B33 #338B6C
split-complementary
#40338B #8B6C33 #528B33
monochromatic
#171231 #2B235E #40338B #5543B8 #7C6ECA

Accessibility & contrast

On white

10.17
#40338B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.06
#40338B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40338B
10.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40338B#FFFFFF#000000##FFFFFF
##40338B1.0010.172.0610.17
#FFFFFF10.171.0021.001.00
#0000002.0621.001.0021.00
##FFFFFF10.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00448E
Deuteranopia (green-blind)
#003E89
Tritanopia (blue-blind)
#22485A
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #40338b;
/* rgb */ color: rgb(64, 51, 139);
/* oklch */ color: oklch(38.9% 0.140 284.5);
Tailwind
colors: {
  custom: {
    50: '#7c6bae',
    500: '#40338b',
    950: '#000000',
  },
}
SCSS
$custom: #40338b;
$custom-light: #7c6bae;
$custom-dark: #000000;
JSON
{
  "hex": "#40338b",
  "rgb": {
    "r": 64,
    "g": 51,
    "b": 139
  },
  "hsl": {
    "h": 248.864,
    "s": 46.316,
    "l": 37.255
  },
  "oklch": {
    "l": 0.38898,
    "c": 0.14008,
    "h": 284.5
  },
  "luminance": 0.05322
}

Semantic roles & 50–950 ramp

primary
#40338B
secondary
#A7B268
accent
#D652C2
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0710
muted
#7C7A7F

Preview Lab

Preview with #40338B

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

Preview Lab → · Contrast checker → · Palette generator →

#40338B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva