#2F31A1#2F31A1

#2F31A1 is a dark, vivid blue. Relative luminance 0.054; OKLCH L 39.3% C 0.176 H 274.0°. Best body text is #FFFFFF at 10.12:1 contrast (WCAG AA passes).

Color values

HEX#2F31A1
RGBrgb(47, 49, 161)
HSLhsl(239, 55%, 41%)
HSVhsv(239, 71%, 63%)
CMYKcmyk(70.8%, 69.6%, 0%, 36.9%)
CIE-LABlab(27.77, 36.67, -60.60)
CIE-LCHlch(27.77, 70.83, 301.18°)
OKLaboklab(39.26% 0.0123 -0.1751)
OKLCHoklch(39.26% 0.176 274)
XYZxyz(8.7015, 5.3733, 34.2899)
Luminance0.0537 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F31A1 #A19F2F
analogous
#2F6AA1 #2F31A1 #662FA1
triadic
#2F31A1 #A12F31 #31A12F
tetradic
#2F31A1 #A12F6A #A19F2F #2FA166
square
#2F31A1 #A12F6A #A19F2F #2FA166
split-complementary
#2F31A1 #A1662F #6AA12F
monochromatic
#131442 #212372 #2F31A1 #4547C9 #7476D6

Accessibility & contrast

On white

10.12
#2F31A1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.07
#2F31A1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F31A1
10.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F31A1#FFFFFF#000000##FFFFFF
##2F31A11.0010.122.0710.12
#FFFFFF10.121.0021.001.00
#0000002.0721.001.0021.00
##FFFFFF10.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047A4
Deuteranopia (green-blind)
#003C9F
Tritanopia (blue-blind)
#004F65
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #2f31a1;
/* rgb */ color: rgb(47, 49, 161);
/* oklch */ color: oklch(39.3% 0.176 274.0);
Tailwind
colors: {
  custom: {
    50: '#786abe',
    500: '#2f31a1',
    950: '#000000',
  },
}
SCSS
$custom: #2f31a1;
$custom-light: #786abe;
$custom-dark: #000000;
JSON
{
  "hex": "#2f31a1",
  "rgb": {
    "r": 47,
    "g": 49,
    "b": 161
  },
  "hsl": {
    "h": 238.947,
    "s": 54.808,
    "l": 40.784
  },
  "oklch": {
    "l": 0.39261,
    "c": 0.17557,
    "h": 274
  },
  "luminance": 0.05374
}

Semantic roles & 50–950 ramp

primary
#2F31A1
secondary
#BEBD6E
accent
#DC4ADE
background
#F7F6FB
surface
#EEEBF7
border
#C9C6D0
text
#0A0612
muted
#7C7A81

Preview Lab

Preview with #2F31A1

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

Preview Lab → · Contrast checker → · Palette generator →

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