#40338D#40338D

#40338D is a dark, vivid blue. Relative luminance 0.054; OKLCH L 39.1% C 0.143 H 284.2°. Best body text is #FFFFFF at 10.11:1 contrast (WCAG AA passes).

Color values

HEX#40338D
RGBrgb(64, 51, 141)
HSLhsl(249, 47%, 38%)
HSVhsv(249, 64%, 55%)
CMYKcmyk(54.6%, 63.8%, 0%, 44.7%)
CIE-LABlab(27.79, 31.31, -48.27)
CIE-LCHlch(27.79, 57.53, 302.97°)
OKLaboklab(39.07% 0.035 -0.1385)
OKLCHoklch(39.07% 0.143 284.2)
XYZxyz(8.1044, 5.3803, 25.8056)
Luminance0.0538 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40338D #808D33
analogous
#33538D #40338D #6D338D
triadic
#40338D #8D4033 #338D40
tetradic
#40338D #8D3353 #808D33 #338D6D
square
#40338D #8D3353 #808D33 #338D6D
split-complementary
#40338D #8D6D33 #538D33
monochromatic
#171233 #2C2360 #40338D #5443BA #7D6FCB

Accessibility & contrast

On white

10.11
#40338D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.08
#40338D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40338D
10.11:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40338D#FFFFFF#000000##FFFFFF
##40338D1.0010.112.0810.11
#FFFFFF10.111.0021.001.00
#0000002.0821.001.0021.00
##FFFFFF10.111.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004490
Deuteranopia (green-blind)
#003F8B
Tritanopia (blue-blind)
#20495B
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #40338d;
/* rgb */ color: rgb(64, 51, 141);
/* oklch */ color: oklch(39.1% 0.143 284.2);
Tailwind
colors: {
  custom: {
    50: '#7c6baf',
    500: '#40338d',
    950: '#000000',
  },
}
SCSS
$custom: #40338d;
$custom-light: #7c6baf;
$custom-dark: #000000;
JSON
{
  "hex": "#40338d",
  "rgb": {
    "r": 64,
    "g": 51,
    "b": 141
  },
  "hsl": {
    "h": 248.667,
    "s": 46.875,
    "l": 37.647
  },
  "oklch": {
    "l": 0.39066,
    "c": 0.14282,
    "h": 284.2
  },
  "luminance": 0.05381
}

Semantic roles & 50–950 ramp

primary
#40338D
secondary
#A8B369
accent
#D751C3
background
#F7F6FA
surface
#EEEBF5
border
#C9C6CF
text
#0A0710
muted
#7C7A7F

Preview Lab

Preview with #40338D

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

Preview Lab → · Contrast checker → · Palette generator →

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