#2F31A5#2F31A5

#2F31A5 is a dark, vivid blue. Relative luminance 0.055; OKLCH L 39.7% C 0.181 H 273.7°. Best body text is #FFFFFF at 9.98:1 contrast (WCAG AA passes).

Color values

HEX#2F31A5
RGBrgb(47, 49, 165)
HSLhsl(239, 56%, 42%)
HSVhsv(239, 72%, 65%)
CMYKcmyk(71.5%, 70.3%, 0%, 35.3%)
CIE-LABlab(28.16, 38.06, -62.39)
CIE-LCHlch(28.16, 73.08, 301.39°)
OKLaboklab(39.66% 0.0117 -0.1804)
OKLCHoklch(39.66% 0.181 273.7)
XYZxyz(9.0599, 5.5167, 36.1774)
Luminance0.0552 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F31A5 #A5A32F
analogous
#2F6CA5 #2F31A5 #682FA5
triadic
#2F31A5 #A52F31 #31A52F
tetradic
#2F31A5 #A52F6C #A5A32F #2FA568
square
#2F31A5 #A52F6C #A5A32F #2FA568
split-complementary
#2F31A5 #A5682F #6CA52F
monochromatic
#141546 #212375 #2F31A5 #4749CB #7678D8

Accessibility & contrast

On white

9.98
#2F31A5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.10
#2F31A5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F31A5
9.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F31A5#FFFFFF#000000##FFFFFF
##2F31A51.009.982.109.98
#FFFFFF9.981.0021.001.00
#0000002.1021.001.0021.00
##FFFFFF9.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048A9
Deuteranopia (green-blind)
#003DA3
Tritanopia (blue-blind)
#005167
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #2f31a5;
/* rgb */ color: rgb(47, 49, 165);
/* oklch */ color: oklch(39.7% 0.181 273.7);
Tailwind
colors: {
  custom: {
    50: '#796ac1',
    500: '#2f31a5',
    950: '#000000',
  },
}
SCSS
$custom: #2f31a5;
$custom-light: #796ac1;
$custom-dark: #000000;
JSON
{
  "hex": "#2f31a5",
  "rgb": {
    "r": 47,
    "g": 49,
    "b": 165
  },
  "hsl": {
    "h": 238.983,
    "s": 55.66,
    "l": 41.569
  },
  "oklch": {
    "l": 0.39656,
    "c": 0.18074,
    "h": 273.7
  },
  "luminance": 0.05518
}

Semantic roles & 50–950 ramp

primary
#2F31A5
secondary
#C0BF70
accent
#DC49DF
background
#F8F6FC
surface
#EFEBF8
border
#CAC6D1
text
#0A0612
muted
#7C7A81

Preview Lab

Preview with #2F31A5

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

Preview Lab → · Contrast checker → · Palette generator →

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