#2F40AB#2F40AB

#2F40AB is a dark, vivid blue. Relative luminance 0.072; OKLCH L 42.8% C 0.171 H 270.4°. Best body text is #FFFFFF at 8.60:1 contrast (WCAG AA passes).

Color values

HEX#2F40AB
RGBrgb(47, 64, 171)
HSLhsl(232, 57%, 43%)
HSVhsv(232, 73%, 67%)
CMYKcmyk(72.5%, 62.6%, 0%, 32.9%)
CIE-LABlab(32.28, 30.69, -59.24)
CIE-LCHlch(32.28, 66.71, 297.39°)
OKLaboklab(42.83% 0.0012 -0.1711)
OKLCHoklch(42.83% 0.171 270.4)
XYZxyz(10.3539, 7.2103, 39.3663)
Luminance0.0721 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F40AB #AB9A2F
analogous
#2F7EAB #2F40AB #5C2FAB
triadic
#2F40AB #AB2F40 #40AB2F
tetradic
#2F40AB #AB2F7E #AB9A2F #2FAB5C
square
#2F40AB #AB2F7E #AB9A2F #2FAB5C
split-complementary
#2F40AB #AB5C2F #7EAB2F
monochromatic
#151C4B #222E7B #2F40AB #4A5CCD #7A87DA

Accessibility & contrast

On white

8.60
#2F40AB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.44
#2F40AB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F40AB
8.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F40AB#FFFFFF#000000##FFFFFF
##2F40AB1.008.602.448.60
#FFFFFF8.601.0021.001.00
#0000002.4421.001.0021.00
##FFFFFF8.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0052AE
Deuteranopia (green-blind)
#0046A9
Tritanopia (blue-blind)
#005B6F
Achromatopsia (no color)
#4C4C4C

Design tokens & code

CSS
--color: #2f40ab;
/* rgb */ color: rgb(47, 64, 171);
/* oklch */ color: oklch(42.8% 0.171 270.4);
Tailwind
colors: {
  custom: {
    50: '#7974c5',
    500: '#2f40ab',
    950: '#000000',
  },
}
SCSS
$custom: #2f40ab;
$custom-light: #7974c5;
$custom-dark: #000000;
JSON
{
  "hex": "#2f40ab",
  "rgb": {
    "r": 47,
    "g": 64,
    "b": 171
  },
  "hsl": {
    "h": 231.774,
    "s": 56.881,
    "l": 42.745
  },
  "oklch": {
    "l": 0.4283,
    "c": 0.17106,
    "h": 270.4
  },
  "luminance": 0.07211
}

Semantic roles & 50–950 ramp

primary
#2F40AB
secondary
#C3B873
accent
#CB48E0
background
#F8F7FC
surface
#EFEDF8
border
#CAC8D1
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #2F40AB

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

Preview Lab → · Contrast checker → · Palette generator →

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