#2F40B2#2F40B2

#2F40B2 is a dark, vivid blue. Relative luminance 0.075; OKLCH L 43.5% C 0.180 H 270.3°. Best body text is #FFFFFF at 8.41:1 contrast (WCAG AA passes).

Color values

HEX#2F40B2
RGBrgb(47, 64, 178)
HSLhsl(232, 58%, 44%)
HSVhsv(232, 74%, 70%)
CMYKcmyk(73.6%, 64%, 0%, 30.2%)
CIE-LABlab(32.88, 33.24, -62.42)
CIE-LCHlch(32.88, 70.72, 298.03°)
OKLaboklab(43.46% 0.0009 -0.1804)
OKLCHoklch(43.46% 0.18 270.3)
XYZxyz(11.0388, 7.4843, 42.9737)
Luminance0.0748 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F40B2 #B2A12F
analogous
#2F82B2 #2F40B2 #602FB2
triadic
#2F40B2 #B22F40 #40B22F
tetradic
#2F40B2 #B22F82 #B2A12F #2FB260
square
#2F40B2 #B22F82 #B2A12F #2FB260
split-complementary
#2F40B2 #B2602F #82B22F
monochromatic
#151D51 #222F82 #2F40B2 #4E5FD0 #7E8BDD

Accessibility & contrast

On white

8.41
#2F40B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.50
#2F40B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F40B2
8.41:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F40B2#FFFFFF#000000##FFFFFF
##2F40B21.008.412.508.41
#FFFFFF8.411.0021.001.00
#0000002.5021.001.0021.00
##FFFFFF8.411.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0054B6
Deuteranopia (green-blind)
#0047B0
Tritanopia (blue-blind)
#005E73
Achromatopsia (no color)
#4D4D4D

Design tokens & code

CSS
--color: #2f40b2;
/* rgb */ color: rgb(47, 64, 178);
/* oklch */ color: oklch(43.5% 0.180 270.3);
Tailwind
colors: {
  custom: {
    50: '#7b75ca',
    500: '#2f40b2',
    950: '#000000',
  },
}
SCSS
$custom: #2f40b2;
$custom-light: #7b75ca;
$custom-dark: #000000;
JSON
{
  "hex": "#2f40b2",
  "rgb": {
    "r": 47,
    "g": 64,
    "b": 178
  },
  "hsl": {
    "h": 232.214,
    "s": 58.222,
    "l": 44.118
  },
  "oklch": {
    "l": 0.43461,
    "c": 0.1804,
    "h": 270.3
  },
  "luminance": 0.07485
}

Semantic roles & 50–950 ramp

primary
#2F40B2
secondary
#C6BC77
accent
#CD46E1
background
#F8F7FC
surface
#EFEDF8
border
#CAC8D1
text
#0B0813
muted
#7C7B82

Preview Lab

Preview with #2F40B2

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

Preview Lab → · Contrast checker → · Palette generator →

#2F40B2 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva