#402FB2#402FB2

#402FB2 is a dark, vivid blue. Relative luminance 0.063; OKLCH L 41.8% C 0.195 H 279.7°. Best body text is #FFFFFF at 9.26:1 contrast (WCAG AA passes).

Color values

HEX#402FB2
RGBrgb(64, 47, 178)
HSLhsl(248, 58%, 44%)
HSVhsv(248, 74%, 70%)
CMYKcmyk(64%, 73.6%, 0%, 30.2%)
CIE-LABlab(30.25, 45.53, -66.71)
CIE-LCHlch(30.25, 80.77, 304.31°)
OKLaboklab(41.85% 0.0328 -0.1925)
OKLCHoklch(41.85% 0.195 279.7)
XYZxyz(11.1642, 6.3365, 42.7456)
Luminance0.0634 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FB2 #A1B22F
analogous
#2F60B2 #402FB2 #822FB2
triadic
#402FB2 #B2402F #2FB240
tetradic
#402FB2 #B22F60 #A1B22F #2FB282
square
#402FB2 #B22F60 #A1B22F #2FB282
split-complementary
#402FB2 #B2822F #60B22F
monochromatic
#1D1551 #2F2282 #402FB2 #5F4ED0 #8B7EDD

Accessibility & contrast

On white

9.26
#402FB2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.27
#402FB2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402FB2
9.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FB2#FFFFFF#000000##FFFFFF
##402FB21.009.262.279.26
#FFFFFF9.261.0021.001.00
#0000002.2721.001.0021.00
##FFFFFF9.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CB6
Deuteranopia (green-blind)
#0042B0
Tritanopia (blue-blind)
#00546E
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #402fb2;
/* rgb */ color: rgb(64, 47, 178);
/* oklch */ color: oklch(41.8% 0.195 279.7);
Tailwind
colors: {
  custom: {
    50: '#836aca',
    500: '#402fb2',
    950: '#000000',
  },
}
SCSS
$custom: #402fb2;
$custom-light: #836aca;
$custom-dark: #000000;
JSON
{
  "hex": "#402fb2",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 178
  },
  "hsl": {
    "h": 247.786,
    "s": 58.222,
    "l": 44.118
  },
  "oklch": {
    "l": 0.41848,
    "c": 0.19529,
    "h": 279.7
  },
  "luminance": 0.06337
}

Semantic roles & 50–950 ramp

primary
#402FB2
secondary
#BCC677
accent
#E146CD
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402FB2

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

Preview Lab → · Contrast checker → · Palette generator →

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