#2F40AA#2F40AA

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

Color values

HEX#2F40AA
RGBrgb(47, 64, 170)
HSLhsl(232, 57%, 43%)
HSVhsv(232, 72%, 67%)
CMYKcmyk(72.4%, 62.4%, 0%, 33.3%)
CIE-LABlab(32.20, 30.32, -58.78)
CIE-LCHlch(32.20, 66.14, 297.29°)
OKLaboklab(42.74% 0.0012 -0.1697)
OKLCHoklch(42.74% 0.17 270.4)
XYZxyz(10.2589, 7.1724, 38.8662)
Luminance0.0717 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F40AA #AA992F
analogous
#2F7EAA #2F40AA #5B2FAA
triadic
#2F40AA #AA2F40 #40AA2F
tetradic
#2F40AA #AA2F7E #AA992F #2FAA5B
square
#2F40AA #AA2F7E #AA992F #2FAA5B
split-complementary
#2F40AA #AA5B2F #7EAA2F
monochromatic
#141C4A #222E7A #2F40AA #495CCD #7987DA

Accessibility & contrast

On white

8.63
#2F40AA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.43
#2F40AA on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F40AA
8.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F40AA#FFFFFF#000000##FFFFFF
##2F40AA1.008.632.438.63
#FFFFFF8.631.0021.001.00
#0000002.4321.001.0021.00
##FFFFFF8.631.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2f40aa;
/* rgb */ color: rgb(47, 64, 170);
/* oklch */ color: oklch(42.7% 0.170 270.4);
Tailwind
colors: {
  custom: {
    50: '#7974c4',
    500: '#2f40aa',
    950: '#000000',
  },
}
SCSS
$custom: #2f40aa;
$custom-light: #7974c4;
$custom-dark: #000000;
JSON
{
  "hex": "#2f40aa",
  "rgb": {
    "r": 47,
    "g": 64,
    "b": 170
  },
  "hsl": {
    "h": 231.707,
    "s": 56.682,
    "l": 42.549
  },
  "oklch": {
    "l": 0.42741,
    "c": 0.16972,
    "h": 270.4
  },
  "luminance": 0.07173
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #2F40AA

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

Preview Lab → · Contrast checker → · Palette generator →

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