#2F51B5#2F51B5

#2F51B5 is a mid, vivid blue. Relative luminance 0.098; OKLCH L 47.0% C 0.164 H 266.0°. Best body text is #FFFFFF at 7.08:1 contrast (WCAG AA passes).

Color values

HEX#2F51B5
RGBrgb(47, 81, 181)
HSLhsl(225, 59%, 45%)
HSVhsv(225, 74%, 71%)
CMYKcmyk(74%, 55.2%, 0%, 29%)
CIE-LABlab(37.52, 23.23, -56.63)
CIE-LCHlch(37.52, 61.21, 292.31°)
OKLaboklab(46.99% -0.0114 -0.1632)
OKLCHoklch(46.99% 0.164 266)
XYZxyz(12.4523, 9.8241, 44.9471)
Luminance0.0983 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F51B5 #B5932F
analogous
#2F94B5 #2F51B5 #502FB5
triadic
#2F51B5 #B52F51 #51B52F
tetradic
#2F51B5 #B52F94 #B5932F #2FB550
square
#2F51B5 #B52F94 #B5932F #2FB550
split-complementary
#2F51B5 #B5502F #94B52F
monochromatic
#162654 #223B84 #2F51B5 #5071D1 #8098DE

Accessibility & contrast

On white

7.08
#2F51B5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.97
#2F51B5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F51B5
7.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F51B5#FFFFFF#000000##FFFFFF
##2F51B51.007.082.977.08
#FFFFFF7.081.0021.001.00
#0000002.9721.001.0021.00
##FFFFFF7.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FB8
Deuteranopia (green-blind)
#0052B3
Tritanopia (blue-blind)
#00697B
Achromatopsia (no color)
#585858

Design tokens & code

CSS
--color: #2f51b5;
/* rgb */ color: rgb(47, 81, 181);
/* oklch */ color: oklch(47.0% 0.164 266.0);
Tailwind
colors: {
  custom: {
    50: '#7a81cc',
    500: '#2f51b5',
    950: '#000000',
  },
}
SCSS
$custom: #2f51b5;
$custom-light: #7a81cc;
$custom-dark: #000000;
JSON
{
  "hex": "#2f51b5",
  "rgb": {
    "r": 47,
    "g": 81,
    "b": 181
  },
  "hsl": {
    "h": 224.776,
    "s": 58.772,
    "l": 44.706
  },
  "oklch": {
    "l": 0.46992,
    "c": 0.16358,
    "h": 266
  },
  "luminance": 0.09825
}

Semantic roles & 50–950 ramp

primary
#2F51B5
secondary
#C7B379
accent
#BA46E2
background
#F8F7FC
surface
#EFEEF9
border
#CAC9D2
text
#0B0A13
muted
#7C7C82

Preview Lab

Preview with #2F51B5

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

Preview Lab → · Contrast checker → · Palette generator →

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