#2F40A5#2F40A5

#2F40A5 is a dark, vivid blue. Relative luminance 0.070; OKLCH L 42.3% C 0.163 H 270.5°. Best body text is #FFFFFF at 8.76:1 contrast (WCAG AA passes).

Color values

HEX#2F40A5
RGBrgb(47, 64, 165)
HSLhsl(231, 56%, 42%)
HSVhsv(231, 72%, 65%)
CMYKcmyk(71.5%, 61.2%, 0%, 35.3%)
CIE-LABlab(31.78, 28.48, -56.46)
CIE-LCHlch(31.78, 63.24, 296.77°)
OKLaboklab(42.3% 0.0013 -0.1629)
OKLCHoklch(42.3% 0.163 270.5)
XYZxyz(9.7949, 6.9868, 36.4224)
Luminance0.0699 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F40A5 #A5942F
analogous
#2F7BA5 #2F40A5 #592FA5
triadic
#2F40A5 #A52F40 #40A52F
tetradic
#2F40A5 #A52F7B #A5942F #2FA559
square
#2F40A5 #A52F7B #A5942F #2FA559
split-complementary
#2F40A5 #A5592F #7BA52F
monochromatic
#141B46 #212E75 #2F40A5 #475ACB #7684D8

Accessibility & contrast

On white

8.76
#2F40A5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2F40A5
8.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F40A5#FFFFFF#000000##FFFFFF
##2F40A51.008.762.408.76
#FFFFFF8.761.0021.001.00
#0000002.4021.001.0021.00
##FFFFFF8.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0050A8
Deuteranopia (green-blind)
#0045A3
Tritanopia (blue-blind)
#00596C
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #2f40a5;
/* rgb */ color: rgb(47, 64, 165);
/* oklch */ color: oklch(42.3% 0.163 270.5);
Tailwind
colors: {
  custom: {
    50: '#7874c1',
    500: '#2f40a5',
    950: '#000000',
  },
}
SCSS
$custom: #2f40a5;
$custom-light: #7874c1;
$custom-dark: #000000;
JSON
{
  "hex": "#2f40a5",
  "rgb": {
    "r": 47,
    "g": 64,
    "b": 165
  },
  "hsl": {
    "h": 231.356,
    "s": 55.66,
    "l": 41.569
  },
  "oklch": {
    "l": 0.423,
    "c": 0.16293,
    "h": 270.5
  },
  "luminance": 0.06988
}

Semantic roles & 50–950 ramp

primary
#2F40A5
secondary
#C0B470
accent
#C949DF
background
#F7F7FB
surface
#EEEDF7
border
#C9C8D0
text
#0A0812
muted
#7C7B81

Preview Lab

Preview with #2F40A5

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

Preview Lab → · Contrast checker → · Palette generator →

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