#2D31A5#2D31A5

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

Color values

HEX#2D31A5
RGBrgb(45, 49, 165)
HSLhsl(238, 57%, 41%)
HSVhsv(238, 73%, 65%)
CMYKcmyk(72.7%, 70.3%, 0%, 35.3%)
CIE-LABlab(28.03, 37.84, -62.60)
CIE-LCHlch(28.03, 73.14, 301.15°)
OKLaboklab(39.53% 0.0094 -0.181)
OKLCHoklch(39.53% 0.181 273)
XYZxyz(8.9698, 5.4702, 36.1732)
Luminance0.0547 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D31A5 #A5A12D
analogous
#2D6DA5 #2D31A5 #652DA5
triadic
#2D31A5 #A52D31 #31A52D
tetradic
#2D31A5 #A52D6D #A5A12D #2DA565
square
#2D31A5 #A52D6D #A5A12D #2DA565
split-complementary
#2D31A5 #A5652D #6DA52D
monochromatic
#131445 #202375 #2D31A5 #4348CC #7377D9

Accessibility & contrast

On white

10.03
#2D31A5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#2D31A5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2D31A5
10.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D31A5#FFFFFF#000000##FFFFFF
##2D31A51.0010.032.0910.03
#FFFFFF10.031.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.031.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2d31a5;
/* rgb */ color: rgb(45, 49, 165);
/* oklch */ color: oklch(39.5% 0.181 273.0);
Tailwind
colors: {
  custom: {
    50: '#786ac1',
    500: '#2d31a5',
    950: '#000000',
  },
}
SCSS
$custom: #2d31a5;
$custom-light: #786ac1;
$custom-dark: #000000;
JSON
{
  "hex": "#2d31a5",
  "rgb": {
    "r": 45,
    "g": 49,
    "b": 165
  },
  "hsl": {
    "h": 238,
    "s": 57.143,
    "l": 41.176
  },
  "oklch": {
    "l": 0.39533,
    "c": 0.18126,
    "h": 273
  },
  "luminance": 0.05471
}

Semantic roles & 50–950 ramp

primary
#2D31A5
secondary
#C1BE6D
accent
#DB47E0
background
#F8F6FC
surface
#EFEBF8
border
#CAC6D1
text
#0A0612
muted
#7C7A81

Preview Lab

Preview with #2D31A5

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

Preview Lab → · Contrast checker → · Palette generator →

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