#402DB2#402DB2

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

Color values

HEX#402DB2
RGBrgb(64, 45, 178)
HSLhsl(249, 60%, 44%)
HSVhsv(249, 75%, 70%)
CMYKcmyk(64%, 74.7%, 0%, 30.2%)
CIE-LABlab(29.86, 46.61, -67.34)
CIE-LCHlch(29.86, 81.90, 304.69°)
OKLaboklab(41.58% 0.0341 -0.1943)
OKLCHoklch(41.58% 0.197 279.9)
XYZxyz(11.0861, 6.1802, 42.7196)
Luminance0.0618 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402DB2 #9FB22D
analogous
#2D5CB2 #402DB2 #822DB2
triadic
#402DB2 #B2402D #2DB240
tetradic
#402DB2 #B22D5C #9FB22D #2DB282
square
#402DB2 #B22D5C #9FB22D #2DB282
split-complementary
#402DB2 #B2822D #5CB22D
monochromatic
#1D1450 #2E2181 #402DB2 #5E4BD1 #8A7CDE

Accessibility & contrast

On white

9.39
#402DB2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402DB2
9.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402DB2#FFFFFF#000000##FFFFFF
##402DB21.009.392.249.39
#FFFFFF9.391.0021.001.00
#0000002.2421.001.0021.00
##FFFFFF9.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BB6
Deuteranopia (green-blind)
#0041B0
Tritanopia (blue-blind)
#00536D
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #402db2;
/* rgb */ color: rgb(64, 45, 178);
/* oklch */ color: oklch(41.6% 0.197 279.9);
Tailwind
colors: {
  custom: {
    50: '#8469ca',
    500: '#402db2',
    950: '#000000',
  },
}
SCSS
$custom: #402db2;
$custom-light: #8469ca;
$custom-dark: #000000;
JSON
{
  "hex": "#402db2",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 178
  },
  "hsl": {
    "h": 248.571,
    "s": 59.641,
    "l": 43.725
  },
  "oklch": {
    "l": 0.41577,
    "c": 0.19732,
    "h": 279.9
  },
  "luminance": 0.06181
}

Semantic roles & 50–950 ramp

primary
#402DB2
secondary
#BBC675
accent
#E345CC
background
#F8F6FC
surface
#F0EBF9
border
#CBC6D2
text
#0C0613
muted
#7D7A82

Preview Lab

Preview with #402DB2

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

Preview Lab → · Contrast checker → · Palette generator →

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