#2F31A6#2F31A6

#2F31A6 is a dark, vivid blue. Relative luminance 0.056; OKLCH L 39.8% C 0.182 H 273.6°. Best body text is #FFFFFF at 9.95:1 contrast (WCAG AA passes).

Color values

HEX#2F31A6
RGBrgb(47, 49, 166)
HSLhsl(239, 56%, 42%)
HSVhsv(239, 72%, 65%)
CMYKcmyk(71.7%, 70.5%, 0%, 34.9%)
CIE-LABlab(28.26, 38.41, -62.83)
CIE-LCHlch(28.26, 73.64, 301.44°)
OKLaboklab(39.76% 0.0116 -0.1817)
OKLCHoklch(39.76% 0.182 273.6)
XYZxyz(9.1512, 5.5532, 36.6586)
Luminance0.0555 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F31A6 #A6A42F
analogous
#2F6CA6 #2F31A6 #692FA6
triadic
#2F31A6 #A62F31 #31A62F
tetradic
#2F31A6 #A62F6C #A6A42F #2FA669
square
#2F31A6 #A62F6C #A6A42F #2FA669
split-complementary
#2F31A6 #A6692F #6CA62F
monochromatic
#141547 #212376 #2F31A6 #4749CB #7779D8

Accessibility & contrast

On white

9.95
#2F31A6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.11
#2F31A6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F31A6
9.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F31A6#FFFFFF#000000##FFFFFF
##2F31A61.009.952.119.95
#FFFFFF9.951.0021.001.00
#0000002.1121.001.0021.00
##FFFFFF9.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048AA
Deuteranopia (green-blind)
#003DA4
Tritanopia (blue-blind)
#005168
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #2f31a6;
/* rgb */ color: rgb(47, 49, 166);
/* oklch */ color: oklch(39.8% 0.182 273.6);
Tailwind
colors: {
  custom: {
    50: '#796ac2',
    500: '#2f31a6',
    950: '#000000',
  },
}
SCSS
$custom: #2f31a6;
$custom-light: #796ac2;
$custom-dark: #000000;
JSON
{
  "hex": "#2f31a6",
  "rgb": {
    "r": 47,
    "g": 49,
    "b": 166
  },
  "hsl": {
    "h": 238.992,
    "s": 55.869,
    "l": 41.765
  },
  "oklch": {
    "l": 0.39755,
    "c": 0.18203,
    "h": 273.6
  },
  "luminance": 0.05554
}

Semantic roles & 50–950 ramp

primary
#2F31A6
secondary
#C1BF70
accent
#DD49DF
background
#F8F6FC
surface
#EFEBF8
border
#CAC6D1
text
#0A0612
muted
#7C7A81

Preview Lab

Preview with #2F31A6

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

Preview Lab → · Contrast checker → · Palette generator →

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