#2A1F97#2A1F97

#2A1F97 is a dark, vivid blue. Relative luminance 0.037; OKLCH L 35.2% C 0.183 H 275.6°. Best body text is #FFFFFF at 12.06:1 contrast (WCAG AA passes).

Color values

HEX#2A1F97
RGBrgb(42, 31, 151)
HSLhsl(246, 66%, 36%)
HSVhsv(246, 79%, 59%)
CMYKcmyk(72.2%, 79.5%, 0%, 40.8%)
CIE-LABlab(22.67, 43.17, -62.91)
CIE-LCHlch(22.67, 76.30, 304.46°)
OKLaboklab(35.24% 0.0178 -0.1819)
OKLCHoklch(35.24% 0.183 275.6)
XYZxyz(7.0289, 3.7059, 29.6170)
Luminance0.0371 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1F97 #8C971F
analogous
#1F5097 #2A1F97 #661F97
triadic
#2A1F97 #972A1F #1F972A
tetradic
#2A1F97 #971F50 #8C971F #1F9766
square
#2A1F97 #971F50 #8C971F #1F9766
split-complementary
#2A1F97 #97661F #50971F
monochromatic
#0E0A31 #1C1564 #2A1F97 #3829CA #6154DC

Accessibility & contrast

On white

12.06
#2A1F97 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#2A1F97 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1F97
12.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1F97#FFFFFF#000000##FFFFFF
##2A1F971.0012.061.7412.06
#FFFFFF12.061.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B9A
Deuteranopia (green-blind)
#003195
Tritanopia (blue-blind)
#00435B
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #2a1f97;
/* rgb */ color: rgb(42, 31, 151);
/* oklch */ color: oklch(35.2% 0.183 275.6);
Tailwind
colors: {
  custom: {
    50: '#755eb7',
    500: '#2a1f97',
    950: '#000000',
  },
}
SCSS
$custom: #2a1f97;
$custom-light: #755eb7;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1f97",
  "rgb": {
    "r": 42,
    "g": 31,
    "b": 151
  },
  "hsl": {
    "h": 245.5,
    "s": 65.934,
    "l": 35.686
  },
  "oklch": {
    "l": 0.35235,
    "c": 0.18275,
    "h": 275.6
  },
  "luminance": 0.03707
}

Semantic roles & 50–950 ramp

primary
#2A1F97
secondary
#B5BF52
accent
#E93FD9
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #2A1F97

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

Preview Lab → · Contrast checker → · Palette generator →

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