#2A1F8E#2A1F8E

#2A1F8E is a dark, vivid blue. Relative luminance 0.034; OKLCH L 34.2% C 0.172 H 276.7°. Best body text is #FFFFFF at 12.46:1 contrast (WCAG AA passes).

Color values

HEX#2A1F8E
RGBrgb(42, 31, 142)
HSLhsl(246, 64%, 34%)
HSVhsv(246, 78%, 56%)
CMYKcmyk(70.4%, 78.2%, 0%, 44.3%)
CIE-LABlab(21.67, 40.25, -58.99)
CIE-LCHlch(21.67, 71.42, 304.31°)
OKLaboklab(34.23% 0.02 -0.1705)
OKLCHoklch(34.23% 0.172 276.7)
XYZxyz(6.3257, 3.4246, 25.9136)
Luminance0.0343 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1F8E #838E1F
analogous
#1F4C8E #2A1F8E #621F8E
triadic
#2A1F8E #8E2A1F #1F8E2A
tetradic
#2A1F8E #8E1F4C #838E1F #1F8E62
square
#2A1F8E #8E1F4C #838E1F #1F8E62
split-complementary
#2A1F8E #8E621F #4C8E1F
monochromatic
#0C092A #1B145C #2A1F8E #392AC0 #5D4FD9

Accessibility & contrast

On white

12.46
#2A1F8E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2A1F8E
12.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1F8E#FFFFFF#000000##FFFFFF
##2A1F8E1.0012.461.6912.46
#FFFFFF12.461.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003991
Deuteranopia (green-blind)
#002F8C
Tritanopia (blue-blind)
#004055
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #2a1f8e;
/* rgb */ color: rgb(42, 31, 142);
/* oklch */ color: oklch(34.2% 0.172 276.7);
Tailwind
colors: {
  custom: {
    50: '#735db0',
    500: '#2a1f8e',
    950: '#000000',
  },
}
SCSS
$custom: #2a1f8e;
$custom-light: #735db0;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1f8e",
  "rgb": {
    "r": 42,
    "g": 31,
    "b": 142
  },
  "hsl": {
    "h": 245.946,
    "s": 64.162,
    "l": 33.922
  },
  "oklch": {
    "l": 0.34234,
    "c": 0.17167,
    "h": 276.7
  },
  "luminance": 0.03425
}

Semantic roles & 50–950 ramp

primary
#2A1F8E
secondary
#B1BB4D
accent
#E741D7
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#090411
muted
#7B7980

Preview Lab

Preview with #2A1F8E

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

Preview Lab → · Contrast checker → · Palette generator →

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