#2F40B5#2F40B5

#2F40B5 is a dark, vivid blue. Relative luminance 0.076; OKLCH L 43.7% C 0.184 H 270.2°. Best body text is #FFFFFF at 8.33:1 contrast (WCAG AA passes).

Color values

HEX#2F40B5
RGBrgb(47, 64, 181)
HSLhsl(232, 59%, 45%)
HSVhsv(232, 74%, 71%)
CMYKcmyk(74%, 64.6%, 0%, 29%)
CIE-LABlab(33.15, 34.32, -63.77)
CIE-LCHlch(33.15, 72.42, 298.29°)
OKLaboklab(43.74% 0.0008 -0.1844)
OKLCHoklch(43.74% 0.184 270.2)
XYZxyz(11.3433, 7.6061, 44.5774)
Luminance0.0761 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F40B5 #B5A42F
analogous
#2F83B5 #2F40B5 #612FB5
triadic
#2F40B5 #B52F40 #40B52F
tetradic
#2F40B5 #B52F83 #B5A42F #2FB561
square
#2F40B5 #B52F83 #B5A42F #2FB561
split-complementary
#2F40B5 #B5612F #83B52F
monochromatic
#161E54 #222F84 #2F40B5 #5060D1 #808CDE

Accessibility & contrast

On white

8.33
#2F40B5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.52
#2F40B5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F40B5
8.33:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F40B5#FFFFFF#000000##FFFFFF
##2F40B51.008.332.528.33
#FFFFFF8.331.0021.001.00
#0000002.5221.001.0021.00
##FFFFFF8.331.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0054B9
Deuteranopia (green-blind)
#0048B3
Tritanopia (blue-blind)
#005F74
Achromatopsia (no color)
#4E4E4E

Design tokens & code

CSS
--color: #2f40b5;
/* rgb */ color: rgb(47, 64, 181);
/* oklch */ color: oklch(43.7% 0.184 270.2);
Tailwind
colors: {
  custom: {
    50: '#7b75cc',
    500: '#2f40b5',
    950: '#000000',
  },
}
SCSS
$custom: #2f40b5;
$custom-light: #7b75cc;
$custom-dark: #000000;
JSON
{
  "hex": "#2f40b5",
  "rgb": {
    "r": 47,
    "g": 64,
    "b": 181
  },
  "hsl": {
    "h": 232.388,
    "s": 58.772,
    "l": 44.706
  },
  "oklch": {
    "l": 0.43736,
    "c": 0.18435,
    "h": 270.2
  },
  "luminance": 0.07607
}

Semantic roles & 50–950 ramp

primary
#2F40B5
secondary
#C7BD79
accent
#CE46E2
background
#F8F7FC
surface
#EFEDF9
border
#CAC8D2
text
#0B0813
muted
#7C7B82

Preview Lab

Preview with #2F40B5

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

Preview Lab → · Contrast checker → · Palette generator →

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