#3151B2#3151B2

#3151B2 is a mid, vivid blue. Relative luminance 0.098; OKLCH L 46.8% C 0.159 H 266.4°. Best body text is #FFFFFF at 7.12:1 contrast (WCAG AA passes).

Color values

HEX#3151B2
RGBrgb(49, 81, 178)
HSLhsl(225, 57%, 45%)
HSVhsv(225, 72%, 70%)
CMYKcmyk(72.5%, 54.5%, 0%, 30.2%)
CIE-LABlab(37.39, 22.37, -55.07)
CIE-LCHlch(37.39, 59.45, 292.11°)
OKLaboklab(46.85% -0.0098 -0.1586)
OKLCHoklch(46.85% 0.159 266.4)
XYZxyz(12.2421, 9.7509, 43.3478)
Luminance0.0975 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#3151B2 #B29231
analogous
#3192B2 #3151B2 #5131B2
triadic
#3151B2 #B23151 #51B231
tetradic
#3151B2 #B23192 #B29231 #31B251
square
#3151B2 #B23192 #B29231 #31B251
split-complementary
#3151B2 #B25131 #92B231
monochromatic
#172552 #243B82 #3151B2 #5170CF #8198DC

Accessibility & contrast

On white

7.12
#3151B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.95
#3151B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #3151B2
7.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##3151B2#FFFFFF#000000##FFFFFF
##3151B21.007.122.957.12
#FFFFFF7.121.0021.001.00
#0000002.9521.001.0021.00
##FFFFFF7.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005EB5
Deuteranopia (green-blind)
#0052B0
Tritanopia (blue-blind)
#006979
Achromatopsia (no color)
#585858

Design tokens & code

CSS
--color: #3151b2;
/* rgb */ color: rgb(49, 81, 178);
/* oklch */ color: oklch(46.8% 0.159 266.4);
Tailwind
colors: {
  custom: {
    50: '#7a81ca',
    500: '#3151b2',
    950: '#000000',
  },
}
SCSS
$custom: #3151b2;
$custom-light: #7a81ca;
$custom-dark: #000000;
JSON
{
  "hex": "#3151b2",
  "rgb": {
    "r": 49,
    "g": 81,
    "b": 178
  },
  "hsl": {
    "h": 225.116,
    "s": 56.828,
    "l": 44.51
  },
  "oklch": {
    "l": 0.46846,
    "c": 0.15888,
    "h": 266.4
  },
  "luminance": 0.09752
}

Semantic roles & 50–950 ramp

primary
#3151B2
secondary
#C5B379
accent
#BA48E0
background
#F8F7FC
surface
#EFEEF8
border
#CAC9D1
text
#0B0A13
muted
#7C7C82

Preview Lab

Preview with #3151B2

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

Preview Lab → · Contrast checker → · Palette generator →

#3151B2 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva