#2F40AC#2F40AC

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

Color values

HEX#2F40AC
RGBrgb(47, 64, 172)
HSLhsl(232, 57%, 43%)
HSVhsv(232, 73%, 67%)
CMYKcmyk(72.7%, 62.8%, 0%, 32.5%)
CIE-LABlab(32.37, 31.05, -59.69)
CIE-LCHlch(32.37, 67.29, 297.48°)
OKLaboklab(42.92% 0.0012 -0.1724)
OKLCHoklch(42.92% 0.172 270.4)
XYZxyz(10.4495, 7.2486, 39.8701)
Luminance0.0725 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F40AC #AC9B2F
analogous
#2F7EAC #2F40AC #5C2FAC
triadic
#2F40AC #AC2F40 #40AC2F
tetradic
#2F40AC #AC2F7E #AC9B2F #2FAC5C
square
#2F40AC #AC2F7E #AC9B2F #2FAC5C
split-complementary
#2F40AC #AC5C2F #7EAC2F
monochromatic
#151C4C #222E7C #2F40AC #4B5CCE #7B88DB

Accessibility & contrast

On white

8.57
#2F40AC on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.45
#2F40AC on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F40AC
8.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F40AC#FFFFFF#000000##FFFFFF
##2F40AC1.008.572.458.57
#FFFFFF8.571.0021.001.00
#0000002.4521.001.0021.00
##FFFFFF8.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0052AF
Deuteranopia (green-blind)
#0046AA
Tritanopia (blue-blind)
#005C70
Achromatopsia (no color)
#4C4C4C

Design tokens & code

CSS
--color: #2f40ac;
/* rgb */ color: rgb(47, 64, 172);
/* oklch */ color: oklch(42.9% 0.172 270.4);
Tailwind
colors: {
  custom: {
    50: '#7974c6',
    500: '#2f40ac',
    950: '#000000',
  },
}
SCSS
$custom: #2f40ac;
$custom-light: #7974c6;
$custom-dark: #000000;
JSON
{
  "hex": "#2f40ac",
  "rgb": {
    "r": 47,
    "g": 64,
    "b": 172
  },
  "hsl": {
    "h": 231.84,
    "s": 57.078,
    "l": 42.941
  },
  "oklch": {
    "l": 0.42919,
    "c": 0.17241,
    "h": 270.4
  },
  "luminance": 0.0725
}

Semantic roles & 50–950 ramp

primary
#2F40AC
secondary
#C3B874
accent
#CC47E0
background
#F8F7FC
surface
#EFEDF8
border
#CAC8D1
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #2F40AC

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

Preview Lab → · Contrast checker → · Palette generator →

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