#402FD4#402FD4

#402FD4 is a mid, highly saturated blue. Relative luminance 0.079; OKLCH L 45.3% C 0.235 H 276.1°. Best body text is #FFFFFF at 8.15:1 contrast (WCAG AA passes).

Color values

HEX#402FD4
RGBrgb(64, 47, 212)
HSLhsl(246, 66%, 51%)
HSVhsv(246, 78%, 83%)
CMYKcmyk(69.8%, 77.8%, 0%, 16.9%)
CIE-LABlab(33.72, 55.95, -80.93)
CIE-LCHlch(33.72, 98.39, 304.66°)
OKLaboklab(45.33% 0.0249 -0.234)
OKLCHoklch(45.33% 0.235 276.1)
XYZxyz(15.0106, 7.8751, 63.0036)
Luminance0.0788 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402FD4 #C3D42F
analogous
#2F70D4 #402FD4 #922FD4
triadic
#402FD4 #D4402F #2FD440
tetradic
#402FD4 #D42F70 #C3D42F #2FD492
square
#402FD4 #D42F70 #C3D42F #2FD492
split-complementary
#402FD4 #D4922F #70D42F
monochromatic
#211771 #2F22A4 #402FD4 #6F62DE #9D94E9

Accessibility & contrast

On white

8.15
#402FD4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.58
#402FD4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402FD4
8.15:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402FD4#FFFFFF#000000##FFFFFF
##402FD41.008.152.588.15
#FFFFFF8.151.0021.001.00
#0000002.5821.001.0021.00
##FFFFFF8.151.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0056D9
Deuteranopia (green-blind)
#0048D1
Tritanopia (blue-blind)
#006181
Achromatopsia (no color)
#4F4F4F

Design tokens & code

CSS
--color: #402fd4;
/* rgb */ color: rgb(64, 47, 212);
/* oklch */ color: oklch(45.3% 0.235 276.1);
Tailwind
colors: {
  custom: {
    50: '#8a6ce3',
    500: '#402fd4',
    950: '#000000',
  },
}
SCSS
$custom: #402fd4;
$custom-light: #8a6ce3;
$custom-dark: #000000;
JSON
{
  "hex": "#402fd4",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 212
  },
  "hsl": {
    "h": 246.182,
    "s": 65.737,
    "l": 50.784
  },
  "oklch": {
    "l": 0.45326,
    "c": 0.23528,
    "h": 276.1
  },
  "luminance": 0.07876
}

Semantic roles & 50–950 ramp

primary
#402FD4
secondary
#CCD48B
accent
#E93FD7
background
#F9F6FE
surface
#F2ECFC
border
#CCC7D5
text
#0E0716
muted
#7E7A84

Preview Lab

Preview with #402FD4

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

Preview Lab → · Contrast checker → · Palette generator →

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