#2A31AB#2A31AB

#2A31AB is a dark, vivid blue. Relative luminance 0.056; OKLCH L 40.0% C 0.190 H 271.6°. Best body text is #FFFFFF at 9.88:1 contrast (WCAG AA passes).

Color values

HEX#2A31AB
RGBrgb(42, 49, 171)
HSLhsl(237, 61%, 42%)
HSVhsv(237, 75%, 67%)
CMYKcmyk(75.4%, 71.3%, 0%, 32.9%)
CIE-LABlab(28.45, 39.62, -65.53)
CIE-LCHlch(28.45, 76.57, 301.16°)
OKLaboklab(39.97% 0.0052 -0.1896)
OKLCHoklch(39.97% 0.19 271.6)
XYZxyz(9.4014, 5.6281, 39.1110)
Luminance0.0563 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A31AB #ABA42A
analogous
#2A72AB #2A31AB #642AAB
triadic
#2A31AB #AB2A31 #31AB2A
tetradic
#2A31AB #AB2A72 #ABA42A #2AAB64
square
#2A31AB #AB2A72 #ABA42A #2AAB64
split-complementary
#2A31AB #AB642A #72AB2A
monochromatic
#121549 #1E237A #2A31AB #4249D1 #7379DD

Accessibility & contrast

On white

9.88
#2A31AB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.13
#2A31AB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A31AB
9.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A31AB#FFFFFF#000000##FFFFFF
##2A31AB1.009.882.139.88
#FFFFFF9.881.0021.001.00
#0000002.1321.001.0021.00
##FFFFFF9.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0049AF
Deuteranopia (green-blind)
#003DA9
Tritanopia (blue-blind)
#00536A
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #2a31ab;
/* rgb */ color: rgb(42, 49, 171);
/* oklch */ color: oklch(40.0% 0.190 271.6);
Tailwind
colors: {
  custom: {
    50: '#796ac5',
    500: '#2a31ab',
    950: '#000000',
  },
}
SCSS
$custom: #2a31ab;
$custom-light: #796ac5;
$custom-dark: #000000;
JSON
{
  "hex": "#2a31ab",
  "rgb": {
    "r": 42,
    "g": 49,
    "b": 171
  },
  "hsl": {
    "h": 236.744,
    "s": 60.563,
    "l": 41.765
  },
  "oklch": {
    "l": 0.39968,
    "c": 0.18971,
    "h": 271.6
  },
  "luminance": 0.05629
}

Semantic roles & 50–950 ramp

primary
#2A31AB
secondary
#C4BF6D
accent
#DB44E4
background
#F8F6FC
surface
#EFEBF8
border
#CAC6D1
text
#0B0613
muted
#7C7A82

Preview Lab

Preview with #2A31AB

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

Preview Lab → · Contrast checker → · Palette generator →

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