#2F40B8#2F40B8

#2F40B8 is a dark, vivid blue. Relative luminance 0.077; OKLCH L 44.0% C 0.188 H 270.2°. Best body text is #FFFFFF at 8.25:1 contrast (WCAG AA passes).

Color values

HEX#2F40B8
RGBrgb(47, 64, 184)
HSLhsl(233, 59%, 45%)
HSVhsv(233, 74%, 72%)
CMYKcmyk(74.5%, 65.2%, 0%, 27.8%)
CIE-LABlab(33.42, 35.40, -65.11)
CIE-LCHlch(33.42, 74.11, 298.54°)
OKLaboklab(44.01% 0.0006 -0.1883)
OKLCHoklch(44.01% 0.188 270.2)
XYZxyz(11.6545, 7.7306, 46.2160)
Luminance0.0773 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F40B8 #B8A72F
analogous
#2F84B8 #2F40B8 #632FB8
triadic
#2F40B8 #B82F40 #40B82F
tetradic
#2F40B8 #B82F84 #B8A72F #2FB863
square
#2F40B8 #B82F84 #B8A72F #2FB863
split-complementary
#2F40B8 #B8632F #84B82F
monochromatic
#161E57 #232F87 #2F40B8 #5262D3 #828EDF

Accessibility & contrast

On white

8.25
#2F40B8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.55
#2F40B8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F40B8
8.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F40B8#FFFFFF#000000##FFFFFF
##2F40B81.008.252.558.25
#FFFFFF8.251.0021.001.00
#0000002.5521.001.0021.00
##FFFFFF8.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0055BC
Deuteranopia (green-blind)
#0048B6
Tritanopia (blue-blind)
#006076
Achromatopsia (no color)
#4F4F4F

Design tokens & code

CSS
--color: #2f40b8;
/* rgb */ color: rgb(47, 64, 184);
/* oklch */ color: oklch(44.0% 0.188 270.2);
Tailwind
colors: {
  custom: {
    50: '#7c75ce',
    500: '#2f40b8',
    950: '#000000',
  },
}
SCSS
$custom: #2f40b8;
$custom-light: #7c75ce;
$custom-dark: #000000;
JSON
{
  "hex": "#2f40b8",
  "rgb": {
    "r": 47,
    "g": 64,
    "b": 184
  },
  "hsl": {
    "h": 232.555,
    "s": 59.307,
    "l": 45.294
  },
  "oklch": {
    "l": 0.44013,
    "c": 0.18826,
    "h": 270.2
  },
  "luminance": 0.07732
}

Semantic roles & 50–950 ramp

primary
#2F40B8
secondary
#C8BF7B
accent
#CF45E2
background
#F8F7FC
surface
#EFEDF9
border
#CAC8D2
text
#0B0814
muted
#7C7B82

Preview Lab

Preview with #2F40B8

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

Preview Lab → · Contrast checker → · Palette generator →

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