#2F40A1#2F40A1

#2F40A1 is a dark, vivid blue. Relative luminance 0.068; OKLCH L 42.0% C 0.157 H 270.5°. Best body text is #FFFFFF at 8.87:1 contrast (WCAG AA passes).

Color values

HEX#2F40A1
RGBrgb(47, 64, 161)
HSLhsl(231, 55%, 41%)
HSVhsv(231, 71%, 63%)
CMYKcmyk(70.8%, 60.2%, 0%, 36.9%)
CIE-LABlab(31.45, 27.01, -54.59)
CIE-LCHlch(31.45, 60.90, 296.32°)
OKLaboklab(41.95% 0.0013 -0.1574)
OKLCHoklch(41.95% 0.157 270.5)
XYZxyz(9.4365, 6.8434, 34.5349)
Luminance0.0684 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F40A1 #A1902F
analogous
#2F79A1 #2F40A1 #572FA1
triadic
#2F40A1 #A12F40 #40A12F
tetradic
#2F40A1 #A12F79 #A1902F #2FA157
square
#2F40A1 #A12F79 #A1902F #2FA157
split-complementary
#2F40A1 #A1572F #79A12F
monochromatic
#131A42 #212D72 #2F40A1 #4558C9 #7483D6

Accessibility & contrast

On white

8.87
#2F40A1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.37
#2F40A1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F40A1
8.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F40A1#FFFFFF#000000##FFFFFF
##2F40A11.008.872.378.87
#FFFFFF8.871.0021.001.00
#0000002.3721.001.0021.00
##FFFFFF8.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004FA4
Deuteranopia (green-blind)
#00459F
Tritanopia (blue-blind)
#00586A
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #2f40a1;
/* rgb */ color: rgb(47, 64, 161);
/* oklch */ color: oklch(42.0% 0.157 270.5);
Tailwind
colors: {
  custom: {
    50: '#7774be',
    500: '#2f40a1',
    950: '#000000',
  },
}
SCSS
$custom: #2f40a1;
$custom-light: #7774be;
$custom-dark: #000000;
JSON
{
  "hex": "#2f40a1",
  "rgb": {
    "r": 47,
    "g": 64,
    "b": 161
  },
  "hsl": {
    "h": 231.053,
    "s": 54.808,
    "l": 40.784
  },
  "oklch": {
    "l": 0.41953,
    "c": 0.15743,
    "h": 270.5
  },
  "luminance": 0.06844
}

Semantic roles & 50–950 ramp

primary
#2F40A1
secondary
#BEB26E
accent
#C84ADE
background
#F7F7FB
surface
#EEEDF7
border
#C9C8D0
text
#0A0812
muted
#7C7B81

Preview Lab

Preview with #2F40A1

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

Preview Lab → · Contrast checker → · Palette generator →

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