#2A1F9F#2A1F9F

#2A1F9F is a dark, vivid blue. Relative luminance 0.040; OKLCH L 36.1% C 0.192 H 274.7°. Best body text is #FFFFFF at 11.70:1 contrast (WCAG AA passes).

Color values

HEX#2A1F9F
RGBrgb(42, 31, 159)
HSLhsl(245, 67%, 37%)
HSVhsv(245, 81%, 62%)
CMYKcmyk(73.6%, 80.5%, 0%, 37.6%)
CIE-LABlab(23.59, 45.72, -66.30)
CIE-LCHlch(23.59, 80.53, 304.59°)
OKLaboklab(36.14% 0.0158 -0.1917)
OKLCHoklch(36.14% 0.192 274.7)
XYZxyz(7.7008, 3.9747, 33.1555)
Luminance0.0398 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1F9F #949F1F
analogous
#1F549F #2A1F9F #6A1F9F
triadic
#2A1F9F #9F2A1F #1F9F2A
tetradic
#2A1F9F #9F1F54 #949F1F #1F9F6A
square
#2A1F9F #9F1F54 #949F1F #1F9F6A
split-complementary
#2A1F9F #9F6A1F #549F1F
monochromatic
#0F0B39 #1C156C #2A1F9F #3829D2 #655ADF

Accessibility & contrast

On white

11.70
#2A1F9F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#2A1F9F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1F9F
11.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1F9F#FFFFFF#000000##FFFFFF
##2A1F9F1.0011.701.8011.70
#FFFFFF11.701.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003EA3
Deuteranopia (green-blind)
#00329D
Tritanopia (blue-blind)
#00465F
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #2a1f9f;
/* rgb */ color: rgb(42, 31, 159);
/* oklch */ color: oklch(36.1% 0.192 274.7);
Tailwind
colors: {
  custom: {
    50: '#775ebd',
    500: '#2a1f9f',
    950: '#000000',
  },
}
SCSS
$custom: #2a1f9f;
$custom-light: #775ebd;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1f9f",
  "rgb": {
    "r": 42,
    "g": 31,
    "b": 159
  },
  "hsl": {
    "h": 245.156,
    "s": 67.368,
    "l": 37.255
  },
  "oklch": {
    "l": 0.36139,
    "c": 0.19238,
    "h": 274.7
  },
  "luminance": 0.03975
}

Semantic roles & 50–950 ramp

primary
#2A1F9F
secondary
#B9C357
accent
#EA3EDB
background
#F8F5FB
surface
#EFE9F7
border
#CAC5D0
text
#0A0512
muted
#7C7981

Preview Lab

Preview with #2A1F9F

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

Preview Lab → · Contrast checker → · Palette generator →

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