#2F40A6#2F40A6

#2F40A6 is a dark, vivid blue. Relative luminance 0.070; OKLCH L 42.4% C 0.164 H 270.4°. Best body text is #FFFFFF at 8.73:1 contrast (WCAG AA passes).

Color values

HEX#2F40A6
RGBrgb(47, 64, 166)
HSLhsl(231, 56%, 42%)
HSVhsv(231, 72%, 65%)
CMYKcmyk(71.7%, 61.4%, 0%, 34.9%)
CIE-LABlab(31.86, 28.85, -56.93)
CIE-LCHlch(31.86, 63.82, 296.88°)
OKLaboklab(42.39% 0.0013 -0.1643)
OKLCHoklch(42.39% 0.164 270.4)
XYZxyz(9.8863, 7.0233, 36.9036)
Luminance0.0702 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F40A6 #A6952F
analogous
#2F7CA6 #2F40A6 #5A2FA6
triadic
#2F40A6 #A62F40 #40A62F
tetradic
#2F40A6 #A62F7C #A6952F #2FA65A
square
#2F40A6 #A62F7C #A6952F #2FA65A
split-complementary
#2F40A6 #A65A2F #7CA62F
monochromatic
#141B47 #212E76 #2F40A6 #475ACB #7785D8

Accessibility & contrast

On white

8.73
#2F40A6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.40
#2F40A6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F40A6
8.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F40A6#FFFFFF#000000##FFFFFF
##2F40A61.008.732.408.73
#FFFFFF8.731.0021.001.00
#0000002.4021.001.0021.00
##FFFFFF8.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0051A9
Deuteranopia (green-blind)
#0046A4
Tritanopia (blue-blind)
#005A6D
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #2f40a6;
/* rgb */ color: rgb(47, 64, 166);
/* oklch */ color: oklch(42.4% 0.164 270.4);
Tailwind
colors: {
  custom: {
    50: '#7874c1',
    500: '#2f40a6',
    950: '#000000',
  },
}
SCSS
$custom: #2f40a6;
$custom-light: #7874c1;
$custom-dark: #000000;
JSON
{
  "hex": "#2f40a6",
  "rgb": {
    "r": 47,
    "g": 64,
    "b": 166
  },
  "hsl": {
    "h": 231.429,
    "s": 55.869,
    "l": 41.765
  },
  "oklch": {
    "l": 0.42387,
    "c": 0.1643,
    "h": 270.4
  },
  "luminance": 0.07024
}

Semantic roles & 50–950 ramp

primary
#2F40A6
secondary
#C1B570
accent
#CA49DF
background
#F7F7FC
surface
#EEEDF8
border
#C9C8D1
text
#0A0812
muted
#7C7B81

Preview Lab

Preview with #2F40A6

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

Preview Lab → · Contrast checker → · Palette generator →

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