#2D1F8A#2D1F8A

#2D1F8A is a dark, vivid blue. Relative luminance 0.034; OKLCH L 34.0% C 0.166 H 278.8°. Best body text is #FFFFFF at 12.54:1 contrast (WCAG AA passes).

Color values

HEX#2D1F8A
RGBrgb(45, 31, 138)
HSLhsl(248, 63%, 33%)
HSVhsv(248, 78%, 54%)
CMYKcmyk(67.4%, 77.5%, 0%, 45.9%)
CIE-LABlab(21.48, 39.28, -56.81)
CIE-LCHlch(21.48, 69.07, 304.66°)
OKLaboklab(34.03% 0.0254 -0.164)
OKLCHoklch(34.03% 0.166 278.8)
XYZxyz(6.1581, 3.3723, 24.3662)
Luminance0.0337 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D1F8A #7C8A1F
analogous
#1F478A #2D1F8A #621F8A
triadic
#2D1F8A #8A2D1F #1F8A2D
tetradic
#2D1F8A #8A1F47 #7C8A1F #1F8A62
square
#2D1F8A #8A1F47 #7C8A1F #1F8A62
split-complementary
#2D1F8A #8A621F #478A1F
monochromatic
#0C0926 #1D1458 #2D1F8A #3D2ABC #5F4CD7

Accessibility & contrast

On white

12.54
#2D1F8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#2D1F8A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2D1F8A
12.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D1F8A#FFFFFF#000000##FFFFFF
##2D1F8A1.0012.541.6712.54
#FFFFFF12.541.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388D
Deuteranopia (green-blind)
#002F88
Tritanopia (blue-blind)
#003E53
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #2d1f8a;
/* rgb */ color: rgb(45, 31, 138);
/* oklch */ color: oklch(34.0% 0.166 278.8);
Tailwind
colors: {
  custom: {
    50: '#745dad',
    500: '#2d1f8a',
    950: '#000000',
  },
}
SCSS
$custom: #2d1f8a;
$custom-light: #745dad;
$custom-dark: #000000;
JSON
{
  "hex": "#2d1f8a",
  "rgb": {
    "r": 45,
    "g": 31,
    "b": 138
  },
  "hsl": {
    "h": 247.85,
    "s": 63.314,
    "l": 33.137
  },
  "oklch": {
    "l": 0.34031,
    "c": 0.166,
    "h": 278.8
  },
  "luminance": 0.03373
}

Semantic roles & 50–950 ramp

primary
#2D1F8A
secondary
#ABBA4B
accent
#E641D1
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #2D1F8A

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

Preview Lab → · Contrast checker → · Palette generator →

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