#2F40A9#2F40A9

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

Color values

HEX#2F40A9
RGBrgb(47, 64, 169)
HSLhsl(232, 56%, 42%)
HSVhsv(232, 72%, 66%)
CMYKcmyk(72.2%, 62.1%, 0%, 33.7%)
CIE-LABlab(32.11, 29.95, -58.32)
CIE-LCHlch(32.11, 65.56, 297.19°)
OKLaboklab(42.65% 0.0012 -0.1684)
OKLCHoklch(42.65% 0.168 270.4)
XYZxyz(10.1647, 7.1347, 38.3699)
Luminance0.0714 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F40A9 #A9982F
analogous
#2F7DA9 #2F40A9 #5B2FA9
triadic
#2F40A9 #A92F40 #40A92F
tetradic
#2F40A9 #A92F7D #A9982F #2FA95B
square
#2F40A9 #A92F7D #A9982F #2FA95B
split-complementary
#2F40A9 #A95B2F #7DA92F
monochromatic
#141C49 #222E79 #2F40A9 #495BCC #7986DA

Accessibility & contrast

On white

8.65
#2F40A9 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2F40A9
8.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F40A9#FFFFFF#000000##FFFFFF
##2F40A91.008.652.438.65
#FFFFFF8.651.0021.001.00
#0000002.4321.001.0021.00
##FFFFFF8.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0051AC
Deuteranopia (green-blind)
#0046A7
Tritanopia (blue-blind)
#005B6E
Achromatopsia (no color)
#4C4C4C

Design tokens & code

CSS
--color: #2f40a9;
/* rgb */ color: rgb(47, 64, 169);
/* oklch */ color: oklch(42.7% 0.168 270.4);
Tailwind
colors: {
  custom: {
    50: '#7974c3',
    500: '#2f40a9',
    950: '#000000',
  },
}
SCSS
$custom: #2f40a9;
$custom-light: #7974c3;
$custom-dark: #000000;
JSON
{
  "hex": "#2f40a9",
  "rgb": {
    "r": 47,
    "g": 64,
    "b": 169
  },
  "hsl": {
    "h": 231.639,
    "s": 56.481,
    "l": 42.353
  },
  "oklch": {
    "l": 0.42652,
    "c": 0.16836,
    "h": 270.4
  },
  "luminance": 0.07136
}

Semantic roles & 50–950 ramp

primary
#2F40A9
secondary
#C2B772
accent
#CB48E0
background
#F7F7FC
surface
#EEEDF8
border
#C9C8D1
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #2F40A9

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

Preview Lab → · Contrast checker → · Palette generator →

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