#2A1F8A#2A1F8A

#2A1F8A is a dark, vivid blue. Relative luminance 0.033; OKLCH L 33.8% C 0.167 H 277.2°. Best body text is #FFFFFF at 12.64:1 contrast (WCAG AA passes).

Color values

HEX#2A1F8A
RGBrgb(42, 31, 138)
HSLhsl(246, 63%, 33%)
HSVhsv(246, 78%, 54%)
CMYKcmyk(69.6%, 77.5%, 0%, 45.9%)
CIE-LABlab(21.23, 38.94, -57.22)
CIE-LCHlch(21.23, 69.21, 304.24°)
OKLaboklab(33.8% 0.021 -0.1653)
OKLCHoklch(33.8% 0.167 277.2)
XYZxyz(6.0308, 3.3067, 24.3603)
Luminance0.0331 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1F8A #7F8A1F
analogous
#1F498A #2A1F8A #5F1F8A
triadic
#2A1F8A #8A2A1F #1F8A2A
tetradic
#2A1F8A #8A1F49 #7F8A1F #1F8A5F
square
#2A1F8A #8A1F49 #7F8A1F #1F8A5F
split-complementary
#2A1F8A #8A5F1F #498A1F
monochromatic
#0C0926 #1B1458 #2A1F8A #392ABC #5B4CD7

Accessibility & contrast

On white

12.64
#2A1F8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#2A1F8A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1F8A
12.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1F8A#FFFFFF#000000##FFFFFF
##2A1F8A1.0012.641.6612.64
#FFFFFF12.641.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00378D
Deuteranopia (green-blind)
#002E88
Tritanopia (blue-blind)
#003E53
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #2a1f8a;
/* rgb */ color: rgb(42, 31, 138);
/* oklch */ color: oklch(33.8% 0.167 277.2);
Tailwind
colors: {
  custom: {
    50: '#725dad',
    500: '#2a1f8a',
    950: '#000000',
  },
}
SCSS
$custom: #2a1f8a;
$custom-light: #725dad;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1f8a",
  "rgb": {
    "r": 42,
    "g": 31,
    "b": 138
  },
  "hsl": {
    "h": 246.168,
    "s": 63.314,
    "l": 33.137
  },
  "oklch": {
    "l": 0.33796,
    "c": 0.16666,
    "h": 277.2
  },
  "luminance": 0.03307
}

Semantic roles & 50–950 ramp

primary
#2A1F8A
secondary
#AEBA4B
accent
#E641D5
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #2A1F8A

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

Preview Lab → · Contrast checker → · Palette generator →

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