#2F31AB#2F31AB

#2F31AB is a dark, vivid blue. Relative luminance 0.057; OKLCH L 40.3% C 0.188 H 273.3°. Best body text is #FFFFFF at 9.78:1 contrast (WCAG AA passes).

Color values

HEX#2F31AB
RGBrgb(47, 49, 171)
HSLhsl(239, 57%, 43%)
HSVhsv(239, 73%, 67%)
CMYKcmyk(72.5%, 71.3%, 0%, 32.9%)
CIE-LABlab(28.75, 40.13, -65.03)
CIE-LCHlch(28.75, 76.42, 301.68°)
OKLaboklab(40.26% 0.0109 -0.1881)
OKLCHoklch(40.26% 0.188 273.3)
XYZxyz(9.6188, 5.7403, 39.1212)
Luminance0.0574 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F31AB #ABA92F
analogous
#2F6FAB #2F31AB #6B2FAB
triadic
#2F31AB #AB2F31 #31AB2F
tetradic
#2F31AB #AB2F6F #ABA92F #2FAB6B
square
#2F31AB #AB2F6F #ABA92F #2FAB6B
split-complementary
#2F31AB #AB6B2F #6FAB2F
monochromatic
#15154B #22237B #2F31AB #4A4CCD #7A7CDA

Accessibility & contrast

On white

9.78
#2F31AB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.15
#2F31AB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F31AB
9.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F31AB#FFFFFF#000000##FFFFFF
##2F31AB1.009.782.159.78
#FFFFFF9.781.0021.001.00
#0000002.1521.001.0021.00
##FFFFFF9.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AAF
Deuteranopia (green-blind)
#003EA9
Tritanopia (blue-blind)
#00536A
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #2f31ab;
/* rgb */ color: rgb(47, 49, 171);
/* oklch */ color: oklch(40.3% 0.188 273.3);
Tailwind
colors: {
  custom: {
    50: '#7a6ac5',
    500: '#2f31ab',
    950: '#000000',
  },
}
SCSS
$custom: #2f31ab;
$custom-light: #7a6ac5;
$custom-dark: #000000;
JSON
{
  "hex": "#2f31ab",
  "rgb": {
    "r": 47,
    "g": 49,
    "b": 171
  },
  "hsl": {
    "h": 239.032,
    "s": 56.881,
    "l": 42.745
  },
  "oklch": {
    "l": 0.40257,
    "c": 0.18839,
    "h": 273.3
  },
  "luminance": 0.05741
}

Semantic roles & 50–950 ramp

primary
#2F31AB
secondary
#C3C173
accent
#DE48E0
background
#F8F6FC
surface
#EFEBF8
border
#CAC6D1
text
#0B0613
muted
#7C7A82

Preview Lab

Preview with #2F31AB

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

Preview Lab → · Contrast checker → · Palette generator →

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