#2F40A3#2F40A3

#2F40A3 is a dark, vivid blue. Relative luminance 0.069; OKLCH L 42.1% C 0.160 H 270.5°. Best body text is #FFFFFF at 8.81:1 contrast (WCAG AA passes).

Color values

HEX#2F40A3
RGBrgb(47, 64, 163)
HSLhsl(231, 55%, 41%)
HSVhsv(231, 71%, 64%)
CMYKcmyk(71.2%, 60.7%, 0%, 36.1%)
CIE-LABlab(31.61, 27.75, -55.53)
CIE-LCHlch(31.61, 62.07, 296.55°)
OKLaboklab(42.13% 0.0013 -0.1602)
OKLCHoklch(42.13% 0.16 270.5)
XYZxyz(9.6143, 6.9145, 35.4712)
Luminance0.0692 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F40A3 #A3922F
analogous
#2F7AA3 #2F40A3 #582FA3
triadic
#2F40A3 #A32F40 #40A32F
tetradic
#2F40A3 #A32F7A #A3922F #2FA358
square
#2F40A3 #A32F7A #A3922F #2FA358
split-complementary
#2F40A3 #A3582F #7AA32F
monochromatic
#141B44 #212D73 #2F40A3 #4659CA #7584D7

Accessibility & contrast

On white

8.81
#2F40A3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.38
#2F40A3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F40A3
8.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F40A3#FFFFFF#000000##FFFFFF
##2F40A31.008.812.388.81
#FFFFFF8.811.0021.001.00
#0000002.3821.001.0021.00
##FFFFFF8.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0050A6
Deuteranopia (green-blind)
#0045A1
Tritanopia (blue-blind)
#00596B
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #2f40a3;
/* rgb */ color: rgb(47, 64, 163);
/* oklch */ color: oklch(42.1% 0.160 270.5);
Tailwind
colors: {
  custom: {
    50: '#7774bf',
    500: '#2f40a3',
    950: '#000000',
  },
}
SCSS
$custom: #2f40a3;
$custom-light: #7774bf;
$custom-dark: #000000;
JSON
{
  "hex": "#2f40a3",
  "rgb": {
    "r": 47,
    "g": 64,
    "b": 163
  },
  "hsl": {
    "h": 231.207,
    "s": 55.238,
    "l": 41.176
  },
  "oklch": {
    "l": 0.42126,
    "c": 0.16019,
    "h": 270.5
  },
  "luminance": 0.06915
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #2F40A3

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

Preview Lab → · Contrast checker → · Palette generator →

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