#2A1F8D#2A1F8D

#2A1F8D is a dark, vivid blue. Relative luminance 0.034; OKLCH L 34.1% C 0.170 H 276.8°. Best body text is #FFFFFF at 12.51:1 contrast (WCAG AA passes).

Color values

HEX#2A1F8D
RGBrgb(42, 31, 141)
HSLhsl(246, 64%, 34%)
HSVhsv(246, 78%, 55%)
CMYKcmyk(70.2%, 78%, 0%, 44.7%)
CIE-LABlab(21.56, 39.93, -58.55)
CIE-LCHlch(21.56, 70.87, 304.29°)
OKLaboklab(34.12% 0.0203 -0.1692)
OKLCHoklch(34.12% 0.17 276.8)
XYZxyz(6.2510, 3.3947, 25.5200)
Luminance0.0340 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1F8D #828D1F
analogous
#1F4B8D #2A1F8D #611F8D
triadic
#2A1F8D #8D2A1F #1F8D2A
tetradic
#2A1F8D #8D1F4B #828D1F #1F8D61
square
#2A1F8D #8D1F4B #828D1F #1F8D61
split-complementary
#2A1F8D #8D611F #4B8D1F
monochromatic
#0C0929 #1B145B #2A1F8D #392ABF #5C4ED8

Accessibility & contrast

On white

12.51
#2A1F8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#2A1F8D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1F8D
12.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1F8D#FFFFFF#000000##FFFFFF
##2A1F8D1.0012.511.6812.51
#FFFFFF12.511.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.511.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003890
Deuteranopia (green-blind)
#002F8B
Tritanopia (blue-blind)
#003F55
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #2a1f8d;
/* rgb */ color: rgb(42, 31, 141);
/* oklch */ color: oklch(34.1% 0.170 276.8);
Tailwind
colors: {
  custom: {
    50: '#735daf',
    500: '#2a1f8d',
    950: '#000000',
  },
}
SCSS
$custom: #2a1f8d;
$custom-light: #735daf;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1f8d",
  "rgb": {
    "r": 42,
    "g": 31,
    "b": 141
  },
  "hsl": {
    "h": 246,
    "s": 63.953,
    "l": 33.725
  },
  "oklch": {
    "l": 0.34124,
    "c": 0.17042,
    "h": 276.8
  },
  "luminance": 0.03395
}

Semantic roles & 50–950 ramp

primary
#2A1F8D
secondary
#B0BB4D
accent
#E741D6
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#090411
muted
#7B7980

Preview Lab

Preview with #2A1F8D

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

Preview Lab → · Contrast checker → · Palette generator →

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