#2F51B7#2F51B7

#2F51B7 is a mid, vivid blue. Relative luminance 0.099; OKLCH L 47.2% C 0.166 H 266.1°. Best body text is #FFFFFF at 7.04:1 contrast (WCAG AA passes).

Color values

HEX#2F51B7
RGBrgb(47, 81, 183)
HSLhsl(225, 59%, 45%)
HSVhsv(225, 74%, 72%)
CMYKcmyk(74.3%, 55.7%, 0%, 28.2%)
CIE-LABlab(37.67, 23.99, -57.57)
CIE-LCHlch(37.67, 62.36, 292.62°)
OKLaboklab(47.15% -0.0112 -0.1659)
OKLCHoklch(47.15% 0.166 266.1)
XYZxyz(12.6590, 9.9067, 46.0356)
Luminance0.0991 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F51B7 #B7952F
analogous
#2F95B7 #2F51B7 #512FB7
triadic
#2F51B7 #B72F51 #51B72F
tetradic
#2F51B7 #B72F95 #B7952F #2FB751
square
#2F51B7 #B72F95 #B7952F #2FB751
split-complementary
#2F51B7 #B7512F #95B72F
monochromatic
#162656 #223B86 #2F51B7 #5171D2 #8299DF

Accessibility & contrast

On white

7.04
#2F51B7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.98
#2F51B7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F51B7
7.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F51B7#FFFFFF#000000##FFFFFF
##2F51B71.007.042.987.04
#FFFFFF7.041.0021.001.00
#0000002.9821.001.0021.00
##FFFFFF7.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FBB
Deuteranopia (green-blind)
#0053B5
Tritanopia (blue-blind)
#006A7C
Achromatopsia (no color)
#595959

Design tokens & code

CSS
--color: #2f51b7;
/* rgb */ color: rgb(47, 81, 183);
/* oklch */ color: oklch(47.2% 0.166 266.1);
Tailwind
colors: {
  custom: {
    50: '#7b81cd',
    500: '#2f51b7',
    950: '#000000',
  },
}
SCSS
$custom: #2f51b7;
$custom-light: #7b81cd;
$custom-dark: #000000;
JSON
{
  "hex": "#2f51b7",
  "rgb": {
    "r": 47,
    "g": 81,
    "b": 183
  },
  "hsl": {
    "h": 225,
    "s": 59.13,
    "l": 45.098
  },
  "oklch": {
    "l": 0.47152,
    "c": 0.16632,
    "h": 266.1
  },
  "luminance": 0.09908
}

Semantic roles & 50–950 ramp

primary
#2F51B7
secondary
#C8B47A
accent
#BB45E2
background
#F8F7FC
surface
#EFEEF9
border
#CAC9D2
text
#0B0A14
muted
#7C7C82

Preview Lab

Preview with #2F51B7

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

Preview Lab → · Contrast checker → · Palette generator →

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