#2A1F8F#2A1F8F

#2A1F8F is a dark, vivid blue. Relative luminance 0.035; OKLCH L 34.3% C 0.173 H 276.6°. Best body text is #FFFFFF at 12.42:1 contrast (WCAG AA passes).

Color values

HEX#2A1F8F
RGBrgb(42, 31, 143)
HSLhsl(246, 64%, 34%)
HSVhsv(246, 78%, 56%)
CMYKcmyk(70.6%, 78.3%, 0%, 43.9%)
CIE-LABlab(21.78, 40.58, -59.43)
CIE-LCHlch(21.78, 71.97, 304.32°)
OKLaboklab(34.34% 0.0198 -0.1718)
OKLCHoklch(34.34% 0.173 276.6)
XYZxyz(6.4011, 3.4548, 26.3108)
Luminance0.0345 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1F8F #848F1F
analogous
#1F4C8F #2A1F8F #621F8F
triadic
#2A1F8F #8F2A1F #1F8F2A
tetradic
#2A1F8F #8F1F4C #848F1F #1F8F62
square
#2A1F8F #8F1F4C #848F1F #1F8F62
split-complementary
#2A1F8F #8F621F #4C8F1F
monochromatic
#0C092A #1B145D #2A1F8F #392AC1 #5D4FD9

Accessibility & contrast

On white

12.42
#2A1F8F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#2A1F8F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1F8F
12.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1F8F#FFFFFF#000000##FFFFFF
##2A1F8F1.0012.421.6912.42
#FFFFFF12.421.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003992
Deuteranopia (green-blind)
#002F8D
Tritanopia (blue-blind)
#004056
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #2a1f8f;
/* rgb */ color: rgb(42, 31, 143);
/* oklch */ color: oklch(34.3% 0.173 276.6);
Tailwind
colors: {
  custom: {
    50: '#745db1',
    500: '#2a1f8f',
    950: '#000000',
  },
}
SCSS
$custom: #2a1f8f;
$custom-light: #745db1;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1f8f",
  "rgb": {
    "r": 42,
    "g": 31,
    "b": 143
  },
  "hsl": {
    "h": 245.893,
    "s": 64.368,
    "l": 34.118
  },
  "oklch": {
    "l": 0.34344,
    "c": 0.17292,
    "h": 276.6
  },
  "luminance": 0.03455
}

Semantic roles & 50–950 ramp

primary
#2A1F8F
secondary
#B1BC4E
accent
#E740D7
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#090411
muted
#7B7980

Preview Lab

Preview with #2A1F8F

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

Preview Lab → · Contrast checker → · Palette generator →

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