#402FAF#402FAF

#402FAF is a dark, vivid blue. Relative luminance 0.062; OKLCH L 41.6% C 0.192 H 280.0°. Best body text is #FFFFFF at 9.36:1 contrast (WCAG AA passes).

Color values

HEX#402FAF
RGBrgb(64, 47, 175)
HSLhsl(248, 58%, 44%)
HSVhsv(248, 73%, 69%)
CMYKcmyk(63.4%, 73.1%, 0%, 31.4%)
CIE-LABlab(29.95, 44.59, -65.40)
CIE-LCHlch(29.95, 79.16, 304.29°)
OKLaboklab(41.55% 0.0334 -0.1887)
OKLCHoklch(41.55% 0.192 280)
XYZxyz(10.8663, 6.2173, 41.1766)
Luminance0.0622 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FAF #9EAF2F
analogous
#2F5EAF #402FAF #802FAF
triadic
#402FAF #AF402F #2FAF40
tetradic
#402FAF #AF2F5E #9EAF2F #2FAF80
square
#402FAF #AF2F5E #9EAF2F #2FAF80
split-complementary
#402FAF #AF802F #5EAF2F
monochromatic
#1D154F #2E227F #402FAF #5E4CCF #897CDC

Accessibility & contrast

On white

9.36
#402FAF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.24
#402FAF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402FAF
9.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FAF#FFFFFF#000000##FFFFFF
##402FAF1.009.362.249.36
#FFFFFF9.361.0021.001.00
#0000002.2421.001.0021.00
##FFFFFF9.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BB3
Deuteranopia (green-blind)
#0042AD
Tritanopia (blue-blind)
#00536C
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #402faf;
/* rgb */ color: rgb(64, 47, 175);
/* oklch */ color: oklch(41.6% 0.192 280.0);
Tailwind
colors: {
  custom: {
    50: '#836ac8',
    500: '#402faf',
    950: '#000000',
  },
}
SCSS
$custom: #402faf;
$custom-light: #836ac8;
$custom-dark: #000000;
JSON
{
  "hex": "#402faf",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 175
  },
  "hsl": {
    "h": 247.969,
    "s": 57.658,
    "l": 43.529
  },
  "oklch": {
    "l": 0.41553,
    "c": 0.19163,
    "h": 280
  },
  "luminance": 0.06218
}

Semantic roles & 50–950 ramp

primary
#402FAF
secondary
#BAC475
accent
#E147CC
background
#F8F6FC
surface
#F0EBF8
border
#CBC6D1
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402FAF

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

Preview Lab → · Contrast checker → · Palette generator →

#402FAF Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva