#402F9C#402F9C

#402F9C is a dark, vivid blue. Relative luminance 0.055; OKLCH L 39.7% C 0.168 H 282.7°. Best body text is #FFFFFF at 9.98:1 contrast (WCAG AA passes).

Color values

HEX#402F9C
RGBrgb(64, 47, 156)
HSLhsl(249, 54%, 40%)
HSVhsv(249, 70%, 61%)
CMYKcmyk(59%, 69.9%, 0%, 38.8%)
CIE-LABlab(28.17, 38.58, -56.85)
CIE-LCHlch(28.17, 68.70, 304.16°)
OKLaboklab(39.74% 0.037 -0.1637)
OKLCHoklch(39.74% 0.168 282.7)
XYZxyz(9.1298, 5.5227, 32.0309)
Luminance0.0552 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402F9C #8B9C2F
analogous
#2F549C #402F9C #772F9C
triadic
#402F9C #9C402F #2F9C40
tetradic
#402F9C #9C2F54 #8B9C2F #2F9C77
square
#402F9C #9C2F54 #8B9C2F #2F9C77
split-complementary
#402F9C #9C772F #549C2F
monochromatic
#19133E #2D216D #402F9C #5742C6 #8171D4

Accessibility & contrast

On white

9.98
#402F9C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.10
#402F9C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402F9C
9.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402F9C#FFFFFF#000000##FFFFFF
##402F9C1.009.982.109.98
#FFFFFF9.981.0021.001.00
#0000002.1021.001.0021.00
##FFFFFF9.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00469F
Deuteranopia (green-blind)
#003F9A
Tritanopia (blue-blind)
#094C62
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #402f9c;
/* rgb */ color: rgb(64, 47, 156);
/* oklch */ color: oklch(39.7% 0.168 282.7);
Tailwind
colors: {
  custom: {
    50: '#7f69ba',
    500: '#402f9c',
    950: '#000000',
  },
}
SCSS
$custom: #402f9c;
$custom-light: #7f69ba;
$custom-dark: #000000;
JSON
{
  "hex": "#402f9c",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 156
  },
  "hsl": {
    "h": 249.358,
    "s": 53.695,
    "l": 39.804
  },
  "oklch": {
    "l": 0.39741,
    "c": 0.1678,
    "h": 282.7
  },
  "luminance": 0.05523
}

Semantic roles & 50–950 ramp

primary
#402F9C
secondary
#AFBC6B
accent
#DD4BC6
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402F9C

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

Preview Lab → · Contrast checker → · Palette generator →

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