#40338E#40338E

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

Color values

HEX#40338E
RGBrgb(64, 51, 142)
HSLhsl(249, 47%, 38%)
HSVhsv(249, 64%, 56%)
CMYKcmyk(54.9%, 64.1%, 0%, 44.3%)
CIE-LABlab(27.87, 31.64, -48.75)
CIE-LCHlch(27.87, 58.12, 302.98°)
OKLaboklab(39.15% 0.035 -0.1399)
OKLCHoklch(39.15% 0.144 284)
XYZxyz(8.1792, 5.4102, 26.1992)
Luminance0.0541 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40338E #818E33
analogous
#33548E #40338E #6D338E
triadic
#40338E #8E4033 #338E40
tetradic
#40338E #8E3354 #818E33 #338E6D
square
#40338E #8E3354 #818E33 #338E6D
split-complementary
#40338E #8E6D33 #548E33
monochromatic
#171334 #2C2361 #40338E #5443BB #7D70CC

Accessibility & contrast

On white

10.09
#40338E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40338E
10.09:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40338E#FFFFFF#000000##FFFFFF
##40338E1.0010.092.0810.09
#FFFFFF10.091.0021.001.00
#0000002.0821.001.0021.00
##FFFFFF10.091.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004591
Deuteranopia (green-blind)
#003F8C
Tritanopia (blue-blind)
#1F495B
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #40338e;
/* rgb */ color: rgb(64, 51, 142);
/* oklch */ color: oklch(39.1% 0.144 284.0);
Tailwind
colors: {
  custom: {
    50: '#7c6bb0',
    500: '#40338e',
    950: '#000000',
  },
}
SCSS
$custom: #40338e;
$custom-light: #7c6bb0;
$custom-dark: #000000;
JSON
{
  "hex": "#40338e",
  "rgb": {
    "r": 64,
    "g": 51,
    "b": 142
  },
  "hsl": {
    "h": 248.571,
    "s": 47.15,
    "l": 37.843
  },
  "oklch": {
    "l": 0.3915,
    "c": 0.14419,
    "h": 284
  },
  "luminance": 0.05411
}

Semantic roles & 50–950 ramp

primary
#40338E
secondary
#A9B469
accent
#D751C4
background
#F7F6FA
surface
#EEEBF5
border
#C9C6CF
text
#0A0710
muted
#7C7A7F

Preview Lab

Preview with #40338E

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

Preview Lab → · Contrast checker → · Palette generator →

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