#2F40B1#2F40B1

#2F40B1 is a dark, vivid blue. Relative luminance 0.074; OKLCH L 43.4% C 0.179 H 270.3°. Best body text is #FFFFFF at 8.44:1 contrast (WCAG AA passes).

Color values

HEX#2F40B1
RGBrgb(47, 64, 177)
HSLhsl(232, 58%, 44%)
HSVhsv(232, 73%, 69%)
CMYKcmyk(73.4%, 63.8%, 0%, 30.6%)
CIE-LABlab(32.80, 32.87, -61.97)
CIE-LCHlch(32.80, 70.15, 297.95°)
OKLaboklab(43.37% 0.001 -0.1791)
OKLCHoklch(43.37% 0.179 270.3)
XYZxyz(10.9388, 7.4443, 42.4469)
Luminance0.0745 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F40B1 #B1A02F
analogous
#2F81B1 #2F40B1 #5F2FB1
triadic
#2F40B1 #B12F40 #40B12F
tetradic
#2F40B1 #B12F81 #B1A02F #2FB15F
square
#2F40B1 #B12F81 #B1A02F #2FB15F
split-complementary
#2F40B1 #B15F2F #81B12F
monochromatic
#151D50 #222F81 #2F40B1 #4D5ED0 #7E8ADD

Accessibility & contrast

On white

8.44
#2F40B1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.49
#2F40B1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F40B1
8.44:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F40B1#FFFFFF#000000##FFFFFF
##2F40B11.008.442.498.44
#FFFFFF8.441.0021.001.00
#0000002.4921.001.0021.00
##FFFFFF8.441.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0053B5
Deuteranopia (green-blind)
#0047AF
Tritanopia (blue-blind)
#005D72
Achromatopsia (no color)
#4D4D4D

Design tokens & code

CSS
--color: #2f40b1;
/* rgb */ color: rgb(47, 64, 177);
/* oklch */ color: oklch(43.4% 0.179 270.3);
Tailwind
colors: {
  custom: {
    50: '#7b74c9',
    500: '#2f40b1',
    950: '#000000',
  },
}
SCSS
$custom: #2f40b1;
$custom-light: #7b74c9;
$custom-dark: #000000;
JSON
{
  "hex": "#2f40b1",
  "rgb": {
    "r": 47,
    "g": 64,
    "b": 177
  },
  "hsl": {
    "h": 232.154,
    "s": 58.036,
    "l": 43.922
  },
  "oklch": {
    "l": 0.4337,
    "c": 0.17907,
    "h": 270.3
  },
  "luminance": 0.07445
}

Semantic roles & 50–950 ramp

primary
#2F40B1
secondary
#C5BB76
accent
#CD47E1
background
#F8F7FC
surface
#EFEDF8
border
#CAC8D1
text
#0B0813
muted
#7C7B82

Preview Lab

Preview with #2F40B1

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

Preview Lab → · Contrast checker → · Palette generator →

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