#2F40B7#2F40B7

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

Color values

HEX#2F40B7
RGBrgb(47, 64, 183)
HSLhsl(233, 59%, 45%)
HSVhsv(233, 74%, 72%)
CMYKcmyk(74.3%, 65%, 0%, 28.2%)
CIE-LABlab(33.33, 35.04, -64.66)
CIE-LCHlch(33.33, 73.55, 298.46°)
OKLaboklab(43.92% 0.0007 -0.187)
OKLCHoklch(43.92% 0.187 270.2)
XYZxyz(11.5500, 7.6888, 45.6659)
Luminance0.0769 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F40B7 #B7A62F
analogous
#2F84B7 #2F40B7 #622FB7
triadic
#2F40B7 #B72F40 #40B72F
tetradic
#2F40B7 #B72F84 #B7A62F #2FB762
square
#2F40B7 #B72F84 #B7A62F #2FB762
split-complementary
#2F40B7 #B7622F #84B72F
monochromatic
#161E56 #222F86 #2F40B7 #5161D2 #828DDF

Accessibility & contrast

On white

8.27
#2F40B7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.54
#2F40B7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F40B7
8.27:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F40B7#FFFFFF#000000##FFFFFF
##2F40B71.008.272.548.27
#FFFFFF8.271.0021.001.00
#0000002.5421.001.0021.00
##FFFFFF8.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0055BB
Deuteranopia (green-blind)
#0048B5
Tritanopia (blue-blind)
#005F75
Achromatopsia (no color)
#4E4E4E

Design tokens & code

CSS
--color: #2f40b7;
/* rgb */ color: rgb(47, 64, 183);
/* oklch */ color: oklch(43.9% 0.187 270.2);
Tailwind
colors: {
  custom: {
    50: '#7c75ce',
    500: '#2f40b7',
    950: '#000000',
  },
}
SCSS
$custom: #2f40b7;
$custom-light: #7c75ce;
$custom-dark: #000000;
JSON
{
  "hex": "#2f40b7",
  "rgb": {
    "r": 47,
    "g": 64,
    "b": 183
  },
  "hsl": {
    "h": 232.5,
    "s": 59.13,
    "l": 45.098
  },
  "oklch": {
    "l": 0.4392,
    "c": 0.18696,
    "h": 270.2
  },
  "luminance": 0.0769
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #2F40B7

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

Preview Lab → · Contrast checker → · Palette generator →

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