#2F40BF#2F40BF

#2F40BF is a dark, vivid blue. Relative luminance 0.080; OKLCH L 44.7% C 0.197 H 270.0°. Best body text is #FFFFFF at 8.06:1 contrast (WCAG AA passes).

Color values

HEX#2F40BF
RGBrgb(47, 64, 191)
HSLhsl(233, 61%, 47%)
HSVhsv(233, 75%, 75%)
CMYKcmyk(75.4%, 66.5%, 0%, 25.1%)
CIE-LABlab(34.05, 37.91, -68.19)
CIE-LCHlch(34.05, 78.02, 299.07°)
OKLaboklab(44.67% 0.0001 -0.1973)
OKLCHoklch(44.67% 0.197 270)
XYZxyz(12.4064, 8.0314, 50.1765)
Luminance0.0803 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F40BF #BFAE2F
analogous
#2F88BF #2F40BF #662FBF
triadic
#2F40BF #BF2F40 #40BF2F
tetradic
#2F40BF #BF2F88 #BFAE2F #2FBF66
square
#2F40BF #BF2F88 #BFAE2F #2FBF66
split-complementary
#2F40BF #BF662F #88BF2F
monochromatic
#171F5D #23308E #2F40BF #5665D5 #8792E1

Accessibility & contrast

On white

8.06
#2F40BF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.61
#2F40BF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F40BF
8.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F40BF#FFFFFF#000000##FFFFFF
##2F40BF1.008.062.618.06
#FFFFFF8.061.0021.001.00
#0000002.6121.001.0021.00
##FFFFFF8.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0057C3
Deuteranopia (green-blind)
#0049BD
Tritanopia (blue-blind)
#00627A
Achromatopsia (no color)
#505050

Design tokens & code

CSS
--color: #2f40bf;
/* rgb */ color: rgb(47, 64, 191);
/* oklch */ color: oklch(44.7% 0.197 270.0);
Tailwind
colors: {
  custom: {
    50: '#7e75d3',
    500: '#2f40bf',
    950: '#000000',
  },
}
SCSS
$custom: #2f40bf;
$custom-light: #7e75d3;
$custom-dark: #000000;
JSON
{
  "hex": "#2f40bf",
  "rgb": {
    "r": 47,
    "g": 64,
    "b": 191
  },
  "hsl": {
    "h": 232.917,
    "s": 60.504,
    "l": 46.667
  },
  "oklch": {
    "l": 0.44669,
    "c": 0.19729,
    "h": 270
  },
  "luminance": 0.08033
}

Semantic roles & 50–950 ramp

primary
#2F40BF
secondary
#CBC27F
accent
#D144E4
background
#F8F7FD
surface
#F0EDFA
border
#CBC8D3
text
#0C0814
muted
#7D7B83

Preview Lab

Preview with #2F40BF

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

Preview Lab → · Contrast checker → · Palette generator →

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