#40338F#40338F

#40338F is a dark, vivid blue. Relative luminance 0.054; OKLCH L 39.2% C 0.146 H 283.9°. Best body text is #FFFFFF at 10.06:1 contrast (WCAG AA passes).

Color values

HEX#40338F
RGBrgb(64, 51, 143)
HSLhsl(248, 47%, 38%)
HSVhsv(248, 64%, 56%)
CMYKcmyk(55.2%, 64.3%, 0%, 43.9%)
CIE-LABlab(27.95, 31.97, -49.24)
CIE-LCHlch(27.95, 58.70, 302.99°)
OKLaboklab(39.24% 0.0349 -0.1413)
OKLCHoklch(39.24% 0.146 283.9)
XYZxyz(8.2546, 5.4403, 26.5964)
Luminance0.0544 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40338F #828F33
analogous
#33548F #40338F #6E338F
triadic
#40338F #8F4033 #338F40
tetradic
#40338F #8F3354 #828F33 #338F6E
square
#40338F #8F3354 #828F33 #338F6E
split-complementary
#40338F #8F6E33 #548F33
monochromatic
#181335 #2C2362 #40338F #5443BC #7D70CC

Accessibility & contrast

On white

10.06
#40338F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#40338F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40338F
10.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40338F#FFFFFF#000000##FFFFFF
##40338F1.0010.062.0910.06
#FFFFFF10.061.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004592
Deuteranopia (green-blind)
#003F8D
Tritanopia (blue-blind)
#1E495C
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #40338f;
/* rgb */ color: rgb(64, 51, 143);
/* oklch */ color: oklch(39.2% 0.146 283.9);
Tailwind
colors: {
  custom: {
    50: '#7d6bb1',
    500: '#40338f',
    950: '#000000',
  },
}
SCSS
$custom: #40338f;
$custom-light: #7d6bb1;
$custom-dark: #000000;
JSON
{
  "hex": "#40338f",
  "rgb": {
    "r": 64,
    "g": 51,
    "b": 143
  },
  "hsl": {
    "h": 248.478,
    "s": 47.423,
    "l": 38.039
  },
  "oklch": {
    "l": 0.39235,
    "c": 0.14556,
    "h": 283.9
  },
  "luminance": 0.05441
}

Semantic roles & 50–950 ramp

primary
#40338F
secondary
#AAB46A
accent
#D751C4
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0A0711
muted
#7C7A80

Preview Lab

Preview with #40338F

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

Preview Lab → · Contrast checker → · Palette generator →

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